public interface AgentBuildSettings
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAccessCode()
Returns build access code used to download artifacts
|
java.lang.String |
getAccessUser()
Get user name to be used to execute authenticated
requests on behalf of build to TeamCity server.
|
BuildAgentConfiguration |
getAgentConfiguration()
Build agent configuration of the build agent.
|
java.io.File |
getAgentTempDirectory()
Returns temporary directory which has the same lifecycle as build temporary
directory: it is cleaned before the build is started
(after
AgentLifeCycleListener.buildStarted(AgentRunningBuild) , but before AgentLifeCycleListener.preparationFinished(AgentRunningBuild)
This directory is intended to be used to store any build-related
files generated by the agent plugins. |
java.util.List<ArtifactDependencyInfo> |
getArtifactDependencies()
Returns artifact dependencies
|
java.lang.String |
getBuildCurrentVersion(VcsRoot vcsRoot)
Returns current version of the specified VCS root
|
long |
getBuildId()
Returns id of the build
|
BuildProgressLogger |
getBuildLogger()
Returns logger which can be used to log messages to the build log on server.
|
java.lang.String |
getBuildPreviousVersion(VcsRoot vcsRoot)
Deprecated.
see jetbrains.buildServer.agent.impl.vcs.AgentWorkDirRevisionManager#getCurrentState(jetbrains.buildServer.agent.AgentRunningBuild)
|
java.util.List<BuildRunnerSettings> |
getBuildRunners() |
java.io.File |
getBuildTempDirectory()
Returns build temporary directory.
|
java.lang.String |
getBuildTypeExternalId()
Returns external build configuration id
|
java.lang.String |
getBuildTypeId()
Returns internal build configuration id
|
java.lang.String |
getBuildTypeName()
Returns name of build configuration (on the moment of build starting)
|
<T> T |
getBuildTypeOptionValue(Option<T> option)
Returns value of the specified build configuration option
|
AgentBuild.CheckoutType |
getCheckoutType()
Returns Checkout Type that was sent by server in the settings of the build.
|
java.io.File |
getDefaultCheckoutDirectory()
Deprecated.
since 10.0. Default checkout directory name is equal to the vcs settings hash
that depends on effective checkout mode, use
getVcsSettingsHashForCheckoutMode(AgentCheckoutMode) |
long |
getExecutionTimeoutMinutes()
Returns build execution timeout in minutes, 0 indicates that there is no limit
|
java.util.List<VcsChangeInfo> |
getPersonalVcsChanges()
Returns list of changed files modified in personal changelist (if build is non personal returns empty list)
|
java.lang.String |
getProjectName()
Returns name of the project (on the moment of build starting)
|
java.util.List<VcsChangeInfo> |
getVcsChanges()
Returns list of changed files in this build (excluding files modified in personal changelist if build is personal)
|
java.util.List<VcsRootEntry> |
getVcsRootEntries()
Returns VCS root entries associated with this build, i.e.
|
java.lang.String |
getVcsSettingsHashForCheckoutMode(AgentCheckoutMode agentCheckoutMode)
Returns vcs settings hash for the specified checkout mode, see
AgentRunningBuild.getEffectiveCheckoutMode()
This hash is used as a default checkout directory name if explicit checkout directory is not defined. |
boolean |
isCheckoutOnAgent()
Returns true if
getCheckoutType() returns AgentBuild.CheckoutType#ON_AGENT
Since 10.0, this method may return false even if checkout will be performed on Agent. |
boolean |
isCheckoutOnServer()
Returns true if
getCheckoutType() returns AgentBuild.CheckoutType#ON_SERVER
Since 10.0, this method may return false even if checkout will be performed on Server. |
boolean |
isCleanBuild()
Returns true if files should be cleaned before build
|
boolean |
isCustomCheckoutDirectory()
Returns true if custom checkout directory is specified.
|
boolean |
isPersonal()
Returns true if build is personal
|
boolean |
isPersonalPatchAvailable() |
java.lang.String getProjectName()
@NotNull java.lang.String getBuildTypeId()
@NotNull java.lang.String getBuildTypeExternalId()
java.lang.String getBuildTypeName()
long getBuildId()
boolean isCleanBuild()
boolean isPersonal()
boolean isPersonalPatchAvailable()
boolean isCheckoutOnAgent()
getCheckoutType()
returns AgentBuild.CheckoutType#ON_AGENT
Since 10.0, this method may return false even if checkout will be performed on Agent.
It is possible if checkout type setting is set to AUTO and is resolved to the Agent-Side checkout.getCheckoutType()
boolean isCheckoutOnServer()
getCheckoutType()
returns AgentBuild.CheckoutType#ON_SERVER
Since 10.0, this method may return false even if checkout will be performed on Server.
It is possible if checkout type setting is set to AUTO and is resolved to the Server-Side checkout.getCheckoutType()
@NotNull AgentBuild.CheckoutType getCheckoutType()
long getExecutionTimeoutMinutes()
@NotNull java.util.List<ArtifactDependencyInfo> getArtifactDependencies()
@NotNull java.lang.String getAccessUser()
getAccessCode()
getAccessCode()
@NotNull java.lang.String getAccessCode()
getAccessUser()
@NotNull java.util.List<VcsRootEntry> getVcsRootEntries()
java.lang.String getBuildCurrentVersion(@NotNull VcsRoot vcsRoot)
vcsRoot
- VCS root@Deprecated java.lang.String getBuildPreviousVersion(@NotNull VcsRoot vcsRoot)
vcsRoot
- VCS rootboolean isCustomCheckoutDirectory()
@NotNull java.util.List<VcsChangeInfo> getVcsChanges()
@NotNull java.util.List<VcsChangeInfo> getPersonalVcsChanges()
@NotNull java.io.File getBuildTempDirectory()
AgentLifeCycleListener.buildStarted(AgentRunningBuild)
, but before AgentLifeCycleListener.preparationFinished(AgentRunningBuild)
It is intended to be set as temporary folder for
running build process.
In general build process may do whatever it need with this directory
contents. Consider using getAgentTempDirectory()
to store
temporary files that are created by any build running code on the build
agent.@NotNull java.io.File getAgentTempDirectory()
AgentLifeCycleListener.buildStarted(AgentRunningBuild)
, but before AgentLifeCycleListener.preparationFinished(AgentRunningBuild)
This directory is intended to be used to store any build-related
files generated by the agent plugins. This folder is not intended to
be used as build process temp directory.@NotNull BuildProgressLogger getBuildLogger()
@NotNull BuildAgentConfiguration getAgentConfiguration()
<T> T getBuildTypeOptionValue(@NotNull Option<T> option)
T
- type of the valueoption
- build configuration option@Deprecated @NotNull java.io.File getDefaultCheckoutDirectory()
getVcsSettingsHashForCheckoutMode(AgentCheckoutMode)
@NotNull java.lang.String getVcsSettingsHashForCheckoutMode(AgentCheckoutMode agentCheckoutMode)
AgentRunningBuild.getEffectiveCheckoutMode()
This hash is used as a default checkout directory name if explicit checkout directory is not defined.agentCheckoutMode
- how checkout will be performed@NotNull java.util.List<BuildRunnerSettings> getBuildRunners()