Package jetbrains.buildServer.serverSide
Class BuildFeature
- java.lang.Object
-
- jetbrains.buildServer.serverSide.BuildFeature
-
- All Implemented Interfaces:
ExecutorModeSupport
,Describable
,ServerExtension
,TeamCityExtension
public abstract class BuildFeature extends java.lang.Object implements ServerExtension, ExecutorModeSupport, Describable
Represents a kind of a plugin that provides some functionality around a build. Usually such plugin has corresponding agent-side part.- Since:
- 6.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BuildFeature.PlaceToShow
Location of build feature settings in UI
-
Constructor Summary
Constructors Constructor Description BuildFeature()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
describeParameters(java.util.Map<java.lang.String,java.lang.String> params)
Returns parameters description of the build feature, will be used in the TeamCity UI to describe this feature settings.java.util.Map<java.lang.String,java.lang.String>
getDefaultParameters()
abstract java.lang.String
getDisplayName()
User presentable name of the feature.abstract java.lang.String
getEditParametersUrl()
PropertiesProcessor
getParametersProcessor()
Deprecated.since 2022.04, implementgetParametersProcessor(BuildTypeIdentity)
insteadPropertiesProcessor
getParametersProcessor(BuildTypeIdentity buildTypeOrTemplate)
Returns parameters processor which will be used to validate and alter parameters specified by user.BuildFeature.PlaceToShow
getPlaceToShow()
Return the UI location for build feature settingsjava.util.Collection<Requirement>
getRequirements(java.util.Map<java.lang.String,java.lang.String> params)
Returns agent requirements imposed by this build feature on build agents which can run builds when this feature is enabledExecutorModeSupportType
getSupportType()
Returns the feature level of support of the executor mode.abstract java.lang.String
getType()
Type of the feature, must be unique among all of the features.boolean
isAvailable(BuildTypeSettings buildTypeSettings)
boolean
isMultipleFeaturesPerBuildTypeAllowed()
Returns true if single build type can contain more than one build feature of this type.boolean
isRequiresAgent()
boolean
isUnchangedBySettingsFreeze()
-
-
-
Method Detail
-
getType
@NotNull public abstract java.lang.String getType()
Type of the feature, must be unique among all of the features.- Returns:
- type of the feature
-
getDisplayName
@NotNull public abstract java.lang.String getDisplayName()
User presentable name of the feature.- Specified by:
getDisplayName
in interfaceDescribable
- Returns:
- name of the feature to show in the user interface.
-
describeParameters
@NotNull public java.lang.String describeParameters(@NotNull java.util.Map<java.lang.String,java.lang.String> params)
Returns parameters description of the build feature, will be used in the TeamCity UI to describe this feature settings.- Parameters:
params
- parameters to describe- Returns:
- short description of parameters.
-
getParametersProcessor
@Deprecated @Nullable public PropertiesProcessor getParametersProcessor()
Deprecated.since 2022.04, implementgetParametersProcessor(BuildTypeIdentity)
insteadReturns parameters processor which will be used to validate and alter parameters specified by user.- Returns:
- see above
-
getParametersProcessor
@Nullable public PropertiesProcessor getParametersProcessor(@NotNull BuildTypeIdentity buildTypeOrTemplate)
Returns parameters processor which will be used to validate and alter parameters specified by user. Unlike the previous method, this one accepts build type or template context- Parameters:
buildTypeOrTemplate
-- Returns:
- Since:
- 2022.04
-
getEditParametersUrl
@Nullable public abstract java.lang.String getEditParametersUrl()
- Returns:
- absolute path to a JSP file or controller for editing parameters, should not include context path.
-
getDefaultParameters
@Nullable public java.util.Map<java.lang.String,java.lang.String> getDefaultParameters()
- Returns:
- default parameters
-
isMultipleFeaturesPerBuildTypeAllowed
public boolean isMultipleFeaturesPerBuildTypeAllowed()
Returns true if single build type can contain more than one build feature of this type.- Returns:
- see above
-
getPlaceToShow
public BuildFeature.PlaceToShow getPlaceToShow()
Return the UI location for build feature settings- Returns:
- see above
- Since:
- 7.0
- See Also:
BuildFeature.PlaceToShow
-
isAvailable
public boolean isAvailable(BuildTypeSettings buildTypeSettings)
- Parameters:
buildTypeSettings
-- Returns:
- true if this build feature should be available for a given build type. If false is returned then build feature should not appear on the available features list.
- Since:
- 2022.04
-
isRequiresAgent
public boolean isRequiresAgent()
- Returns:
- true if this build feature has some code which should be executed on the agent during the build. If false is returned then parameters of this feature will not be passed to an agent.
- Since:
- 2017.2
-
getRequirements
@NotNull public java.util.Collection<Requirement> getRequirements(java.util.Map<java.lang.String,java.lang.String> params)
Returns agent requirements imposed by this build feature on build agents which can run builds when this feature is enabled- Parameters:
params
- parameters of the build feature- Returns:
- see above
- Since:
- 2019.1
-
isUnchangedBySettingsFreeze
public boolean isUnchangedBySettingsFreeze()
- Returns:
- true if the build feature is supposed to stay unchanged by settings freeze. This is important for build features that may affect a build before the settings freeze happens for that build. If any change in such a build feature is taken from VCS after the build is triggered, this change will not affect that build.
- Since:
- 2020.1
-
getSupportType
@NotNull public ExecutorModeSupportType getSupportType()
Returns the feature level of support of the executor mode.- Specified by:
getSupportType
in interfaceExecutorModeSupport
- Returns:
- see above
- Since:
- 2022.12
-
-