Package jetbrains.buildServer.serverSide
Class BuildFeature
- java.lang.Object
-
- jetbrains.buildServer.serverSide.BuildFeature
-
- All Implemented Interfaces:
ExecutorModeSupport,Describable,ServerExtension,TeamCityExtension
- Direct Known Subclasses:
ApprovalBuildFeature,AutoMergeBuildFeature,BuildCacheFeature,BuildFailureOnMessageFeature,BuildFailureOnMetricFeature,FreeSpaceBuildFeature,KeepRuleBuildFeature,MockBuildFeature,NotificationsBuildFeature,PipelineBuildFeature,VcsLabelingBuildFeature
public abstract class BuildFeature extends 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 classBuildFeature.PlaceToShowLocation 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 StringdescribeParameters(Map<String,String> params)Returns parameters description of the build feature, will be used in the TeamCity UI to describe this feature settings.Map<String,String>getDefaultParameters()abstract StringgetDisplayName()User presentable name of the feature.abstract StringgetEditParametersUrl()PropertiesProcessorgetParametersProcessor()Deprecated.since 2022.04, implementgetParametersProcessor(BuildTypeIdentity)insteadPropertiesProcessorgetParametersProcessor(BuildTypeIdentity buildTypeOrTemplate)Returns parameters processor which will be used to validate and alter parameters specified by user.BuildFeature.PlaceToShowgetPlaceToShow()Return the UI location for build feature settingsCollection<Requirement>getRequirements(Map<String,String> params)Returns agent requirements imposed by this build feature on build agents which can run builds when this feature is enabledExecutorModeSupportTypegetSupportType()Returns the feature level of support of the executor mode.abstract StringgetType()Type of the feature, must be unique among all of the features.booleanisAvailable(BuildTypeSettings buildTypeSettings)booleanisMultipleFeaturesPerBuildTypeAllowed()Returns true if single build type can contain more than one build feature of this type.booleanisRequiresAgent()booleanisUnchangedBySettingsFreeze()
-
-
-
Method Detail
-
getType
@NotNull public abstract String getType()
Type of the feature, must be unique among all of the features.- Returns:
- type of the feature
-
getDisplayName
@NotNull public abstract String getDisplayName()
User presentable name of the feature.- Specified by:
getDisplayNamein interfaceDescribable- Returns:
- name of the feature to show in the user interface.
-
describeParameters
@NotNull public String describeParameters(@NotNull Map<String,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 String getEditParametersUrl()
- Returns:
- absolute path to a JSP file or controller for editing parameters, should not include context path.
-
getDefaultParameters
@Nullable public Map<String,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 Collection<Requirement> getRequirements(Map<String,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:
getSupportTypein interfaceExecutorModeSupport- Returns:
- see above
- Since:
- 2022.12
-
-