public interface AgentRunningBuild extends AgentBuildSettings, jetbrains.buildServer.log.Loggable
Modifier and Type | Method and Description |
---|---|
void |
addSharedConfigParameter(java.lang.String key,
java.lang.String value)
Adds build wide configuration parameter.
|
void |
addSharedEnvironmentVariable(java.lang.String key,
java.lang.String value)
Adds build wide environment variable.
|
void |
addSharedSystemProperty(java.lang.String key,
java.lang.String value)
Adds build wide system property.
|
java.lang.String |
getArtifactsPaths()
Returns artifacts paths specified for build.
|
java.util.Map<java.lang.String,java.lang.String> |
getArtifactStorageSettings() |
java.util.Collection<AgentBuildFeature> |
getBuildFeatures() |
java.util.Collection<AgentBuildFeature> |
getBuildFeaturesOfType(java.lang.String type) |
java.lang.String |
getBuildNumber()
Returns current build number.
|
BuildParametersMap |
getBuildParameters()
Deprecated.
use
BuildRunnerContext.getBuildParameters() }
returns build parameters of currently selected build runner |
java.io.File |
getCheckoutDirectory()
Returns checkout directory: directory where checkout is performed
|
AgentCheckoutMode |
getEffectiveCheckoutMode()
Get checkout mode that is used for this build.
|
boolean |
getFailBuildOnExitCode()
Property is defined by build configuration settings to define
the way build runner should process build process exit code.
|
BuildInterruptReason |
getInterruptReason()
Use this method to check if build is interrupted.
|
PasswordReplacer |
getPasswordReplacer() |
java.util.Map<java.lang.String,java.lang.String> |
getRunnerParameters()
Deprecated.
use
BuildRunnerContext.getRunnerParameters() }
returns runner parameters of currently selected build runner |
BuildParametersMap |
getSharedBuildParameters()
Returns build parameters.
|
java.util.Map<java.lang.String,java.lang.String> |
getSharedConfigParameters()
Returns configuration parameters of this build
If you have
BuildRunnerContext , consider using BuildRunnerContext.getConfigParameters() |
ValueResolver |
getSharedParametersResolver()
Creates value resolver for parameters resolution in strings.
|
java.io.File |
getWorkingDirectory()
Deprecated.
use
BuildRunnerContext.getWorkingDirectory()
this method returns working directory of first build runner. |
void |
interruptBuild(java.lang.String comment,
boolean reQueue)
Interrupt and cancel running build.
|
boolean |
isBuildFailingOnServer()
Make synchronous call to the build server and check if the build is failing there
|
boolean |
isInAlwaysExecutingStage() |
void |
stopBuild(java.lang.String reason)
Terminates execution of the build at the current build stage.
|
getAccessCode, getAccessUser, getAgentConfiguration, getAgentTempDirectory, getArtifactDependencies, getBuildCurrentVersion, getBuildId, getBuildLogger, getBuildPreviousVersion, getBuildRunners, getBuildTempDirectory, getBuildTypeExternalId, getBuildTypeId, getBuildTypeName, getBuildTypeOptionValue, getCheckoutType, getDefaultCheckoutDirectory, getExecutionTimeoutMinutes, getPersonalVcsChanges, getProjectName, getVcsChanges, getVcsRootEntries, getVcsSettingsHashForCheckoutMode, isCheckoutOnAgent, isCheckoutOnServer, isCleanBuild, isCustomCheckoutDirectory, isPersonal, isPersonalPatchAvailable
@NotNull java.io.File getCheckoutDirectory()
@Nullable AgentCheckoutMode getEffectiveCheckoutMode()
AgentBuildSettings.getCheckoutType()
as it resolves AgentBuild.CheckoutType#AUTO
to the server or agent-side checkout.@NotNull @Deprecated java.io.File getWorkingDirectory()
BuildRunnerContext.getWorkingDirectory()
this method returns working directory of first build runner.@Nullable java.lang.String getArtifactsPaths()
boolean getFailBuildOnExitCode()
@NotNull @Deprecated BuildParametersMap getBuildParameters()
BuildRunnerContext.getBuildParameters()
}
returns build parameters of currently selected build runner@NotNull @Deprecated java.util.Map<java.lang.String,java.lang.String> getRunnerParameters()
BuildRunnerContext.getRunnerParameters()
}
returns runner parameters of currently selected build runner@NotNull java.lang.String getBuildNumber()
@NotNull java.util.Map<java.lang.String,java.lang.String> getSharedConfigParameters()
BuildRunnerContext
, consider using BuildRunnerContext.getConfigParameters()
BuildRunnerContext.getConfigParameters()
void addSharedConfigParameter(@NotNull java.lang.String key, @NotNull java.lang.String value)
BuildRunnerContext
, consider using BuildRunnerContext.addConfigParameter(String, String)
*key
- namevalue
- valueBuildRunnerContext.addConfigParameter(String, String)
void addSharedSystemProperty(@NotNull java.lang.String key, @NotNull java.lang.String value)
Constants.SYSTEM_PREFIX
prefix
Modifications will be available in all build runner states.
If you have BuildRunnerContext
, consider using BuildRunnerContext.addSystemProperty(String, String)
key
- property namevalue
- property valueBuildRunnerContext.addSystemProperty(String, String)
void addSharedEnvironmentVariable(@NotNull java.lang.String key, @NotNull java.lang.String value)
Constants.ENV_PREFIX
prefix
Note, on Windows machines environment size can be limited.
Modifications will be available in all build runner states.
If you have BuildRunnerContext
, consider using BuildRunnerContext.addEnvironmentVariable(String, String)
key
- name may be case sensitive or not depending on OSvalue
- value environment variable valueBuildRunnerContext.addEnvironmentVariable(String, String)
@NotNull BuildParametersMap getSharedBuildParameters()
BuildRunnerContext
, consider using BuildRunnerContext.getBuildParameters()
BuildRunnerContext.getBuildParameters()
@NotNull ValueResolver getSharedParametersResolver()
@NotNull java.util.Collection<AgentBuildFeature> getBuildFeatures()
@NotNull java.util.Collection<AgentBuildFeature> getBuildFeaturesOfType(@NotNull java.lang.String type)
type
- type to filter featuresvoid stopBuild(@NotNull java.lang.String reason)
AgentLifeCycleListener.beforeBuildInterrupted(AgentRunningBuild, BuildInterruptReason)
event will be fired.reason
- build stop reason@Nullable BuildInterruptReason getInterruptReason()
void interruptBuild(@NotNull java.lang.String comment, boolean reQueue)
comment
- will be used as a canceling comment for the buildreQueue
- if true, build should be re-queued on the server sideboolean isBuildFailingOnServer() throws java.lang.InterruptedException
java.lang.InterruptedException
- if the request cannot be completed (for instance, the build is no longer present on the server)boolean isInAlwaysExecutingStage()
ServerProvidedProperties.BUILD_STEP_EXECUTION_MODE_ALWAYS
@NotNull PasswordReplacer getPasswordReplacer()
@NotNull java.util.Map<java.lang.String,java.lang.String> getArtifactStorageSettings()