Class VCSSettingsBuildParametersProvider
- java.lang.Object
-
- jetbrains.buildServer.serverSide.parameters.AbstractBuildParametersProvider
-
- jetbrains.buildServer.serverSide.parameters.VCSSettingsBuildParametersProvider
-
- All Implemented Interfaces:
CustomSettingsMapper
,BuildParametersProvider
,ServerExtension
,TeamCityExtension
public class VCSSettingsBuildParametersProvider extends AbstractBuildParametersProvider implements CustomSettingsMapper
Adds properties of VCS roots as build's references. The properties are added in the form "vcsroot.<escaped_root_name>.<VCSRoot_property>". For the BuildTypes with only a single root, all properties are also accessible via simplified notation: "vcsroot.<VCSRoot_property>".- Author:
- Yegor.Yarko Date: 20.01.2009
-
-
Field Summary
Fields Modifier and Type Field Description static String
VCS_PROPERTY_PREFIX
-
Constructor Summary
Constructors Constructor Description VCSSettingsBuildParametersProvider(VersionedSettingsManager versionedSettingsManager, EventDispatcher<ConfigActionsServerListener> dispatcher, ServerResponsibility serverResponsibility)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
getParameters(SBuild build, boolean emulationMode)
Returns additional build parameters.String
getPrefix()
void
mapData(CopiedObjects copiedObjects)
-
Methods inherited from class jetbrains.buildServer.serverSide.parameters.AbstractBuildParametersProvider
getParametersAvailableOnAgent
-
-
-
-
Field Detail
-
VCS_PROPERTY_PREFIX
public static final String VCS_PROPERTY_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VCSSettingsBuildParametersProvider
public VCSSettingsBuildParametersProvider(@NotNull VersionedSettingsManager versionedSettingsManager, @NotNull EventDispatcher<ConfigActionsServerListener> dispatcher, @NotNull ServerResponsibility serverResponsibility)
-
-
Method Detail
-
getParameters
@NotNull public Map<String,String> getParameters(@NotNull SBuild build, boolean emulationMode)
Description copied from interface:BuildParametersProvider
Returns additional build parameters.- Specified by:
getParameters
in interfaceBuildParametersProvider
- Overrides:
getParameters
in classAbstractBuildParametersProvider
- Parameters:
build
- the build for which parameters should be addedemulationMode
- if true then parameters are calculated in the emulation mode and provided build is a mock build. There are two cases when emulationMode is true:- when a build for which we need to compute parameters is still in the queue
- when parameters should be calculated in a context of a build configuration when there is no build at all
BuildPromotionOwner.getBuildPromotion()
will return an instance of aBuildPromotion
which is in the queue (BuildPromotion.getQueuedBuild()
will return a not null object), while in the second case a mock ofBuildPromotion
without any associated queued or started builds will be returned- Returns:
- the map of the parameter name - parameter value pairs
To provide descriptions for the properties
ParameterDescriptionProvider
-
getPrefix
@NotNull public String getPrefix()
- Specified by:
getPrefix
in interfaceBuildParametersProvider
- Overrides:
getPrefix
in classAbstractBuildParametersProvider
- Returns:
- a common prefix used for all parameter names generated by this provider, returns empty string if there is no common prefix
-
mapData
public void mapData(@NotNull CopiedObjects copiedObjects)
- Specified by:
mapData
in interfaceCustomSettingsMapper
-
-