Class AgentlessBuildParametersProvider
- java.lang.Object
-
- jetbrains.buildServer.serverSide.parameters.AbstractBuildParametersProvider
-
- jetbrains.buildServer.serverSide.agentless.AgentlessBuildParametersProvider
-
- All Implemented Interfaces:
BuildStartContextProcessor
,BuildParametersProvider
,ServerExtension
,TeamCityExtension
public class AgentlessBuildParametersProvider extends AbstractBuildParametersProvider implements BuildStartContextProcessor
-
-
Constructor Summary
Constructors Constructor Description AgentlessBuildParametersProvider()
-
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.Collection<String>
getParametersAvailableOnAgent(SBuild build)
Returns collection of parameters (names) always available on the agent for the specified build.void
updateParameters(BuildStartContext context)
This extension point is called before parameters are sent to a build agent.-
Methods inherited from class jetbrains.buildServer.serverSide.parameters.AbstractBuildParametersProvider
getPrefix
-
-
-
-
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
-
getParametersAvailableOnAgent
@NotNull public Collection<String> getParametersAvailableOnAgent(@NotNull SBuild build)
Description copied from interface:BuildParametersProvider
Returns collection of parameters (names) always available on the agent for the specified build. Because concrete values of these parameters are not known on the server side only names are returned. This collection may not contain parameters returned byBuildParametersProvider.getParameters(jetbrains.buildServer.serverSide.SBuild,boolean)
. To provide descriptions for the propertiesParameterDescriptionProvider
- Specified by:
getParametersAvailableOnAgent
in interfaceBuildParametersProvider
- Overrides:
getParametersAvailableOnAgent
in classAbstractBuildParametersProvider
- Parameters:
build
- build- Returns:
- see above
-
updateParameters
public void updateParameters(@NotNull BuildStartContext context)
Description copied from interface:BuildStartContextProcessor
This extension point is called before parameters are sent to a build agent. Build context can be used to alter parameters of a build before data is sent to a build agent- Specified by:
updateParameters
in interfaceBuildStartContextProcessor
- Parameters:
context
- context to update
-
-