Package jetbrains.buildServer.agent
Interface BuildAgentConfigurationEx
-
- All Superinterfaces:
BuildAgentConfiguration
,InternalPropertiesHolder
- All Known Implementing Classes:
BuildAgentConfigurationImpl
public interface BuildAgentConfigurationEx extends BuildAgentConfiguration, InternalPropertiesHolder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description File
getAgentConfDirectory()
AgentContextEx
getAgentContext()
File
getAgentInfoFile()
File
getAgentPluginsUnpackingInfoFile()
File
getAgentUpgradeFiltersFile()
Collection<String>
getAlternativeAddresses()
File
getCacheDirectory()
Returns path to a folder underBuildAgentConfiguration.getTempDirectory()
Temp directory for build agent instance is set to that folder.SimpleCredentials
getServerProxyCredentials()
String
getServerProxyHost()
int
getServerProxyPort()
File
getVcsCheckoutdirStateFile(File checkoutDir)
File[]
getVcsCheckoutdirStateFiles()
void
initFrom(File propertiesFile)
Loads configuration from the properties fileboolean
isLoadingToolsOnDemandAllowing()
boolean
isUpgradeDisabled()
Checks for system property that disables build agent upgradevoid
setAuthorizationToken(String token)
Changes agent authorization tokenvoid
setName(String name)
Changes agent namevoid
setOwnPort(int port)
Changes agent portvoid
setServerUrl(String serverUrl)
Sets new server URLvoid
setTempDir(String pathToTempDir)
Sets new path to temp directoryvoid
setWorkDir(String pathToWorkDir)
Sets new path to work directoryvoid
updateConfiguration(AgentRegistrationDetails details)
Updates configuration to reflect changes from AgentRegistrationDetailsvoid
validateParameters()
Validated build agent configuration.-
Methods inherited from interface jetbrains.buildServer.agent.BuildAgentConfiguration
addAlternativeAgentAddress, addConfigurationParameter, addCustomProperty, addEnvironmentVariable, addSystemProperty, getAgentHomeDirectory, getAgentLibDirectory, getAgentLogsDirectory, getAgentPluginsDirectory, getAgentTempDirectory, getAgentToolsDirectory, getAgentUpdateDirectory, getAuthorizationToken, getBuildParameters, getBuildTempDirectory, getCacheDirectory, getConfigurationParameters, getCustomProperties, getName, getOperationMode, getOwnAddress, getOwnPort, getParametersResolver, getPingCode, getServerConnectionTimeout, getServerUrl, getSystemDirectory, getSystemInfo, getTempDirectory, getWorkDirectory, removeConfigurationParameter
-
Methods inherited from interface jetbrains.buildServer.agent.InternalPropertiesHolder
getInternalProperty
-
-
-
-
Method Detail
-
getAgentConfDirectory
@NotNull File getAgentConfDirectory()
- Returns:
- path to agent conf directory
-
getCacheDirectory
@NotNull File getCacheDirectory()
Returns path to a folder underBuildAgentConfiguration.getTempDirectory()
Temp directory for build agent instance is set to that folder. This folder is cleaned on build agent start. The same values is set to java.io.tmpdir system property- Returns:
- see above
-
initFrom
void initFrom(File propertiesFile)
Loads configuration from the properties file- Parameters:
propertiesFile
- properties file
-
setOwnPort
void setOwnPort(int port)
Changes agent port- Parameters:
port
- port
-
setName
void setName(String name)
Changes agent name- Parameters:
name
- agent name
-
setAuthorizationToken
void setAuthorizationToken(@NotNull String token)
Changes agent authorization token- Parameters:
token
- agent authorization token
-
setServerUrl
void setServerUrl(String serverUrl)
Sets new server URL- Parameters:
serverUrl
- server URL
-
setWorkDir
void setWorkDir(String pathToWorkDir)
Sets new path to work directory- Parameters:
pathToWorkDir
- new path to work directory
-
setTempDir
void setTempDir(String pathToTempDir)
Sets new path to temp directory- Parameters:
pathToTempDir
- new path to temp directory
-
isUpgradeDisabled
boolean isUpgradeDisabled()
Checks for system property that disables build agent upgrade- Returns:
- true if upgrade is disabled
-
updateConfiguration
void updateConfiguration(@NotNull AgentRegistrationDetails details)
Updates configuration to reflect changes from AgentRegistrationDetails- Parameters:
details
- server data
-
getAlternativeAddresses
@NotNull Collection<String> getAlternativeAddresses()
- Returns:
- a list of plugin provided own addresses.
-
getAgentContext
@NotNull AgentContextEx getAgentContext()
- Returns:
- agent parameters context
- Since:
- 6.0
-
getAgentInfoFile
@NotNull File getAgentInfoFile()
- Returns:
- teamcity-agent.xml file path
- Since:
- 6.5
-
getAgentPluginsUnpackingInfoFile
@NotNull File getAgentPluginsUnpackingInfoFile()
- Returns:
- file where agent manager stores information about unpacked plugins location
- Since:
- 7.0
-
getAgentUpgradeFiltersFile
@NotNull File getAgentUpgradeFiltersFile()
- Returns:
- path to a file that accepts agent upgrade configuration
- Since:
- 7.0
-
getVcsCheckoutdirStateFile
@NotNull File getVcsCheckoutdirStateFile(@NotNull File checkoutDir)
- Returns:
- xml file containing vcs revision information for provided directory (must be checkout directory of one or more configurations).
- Since:
- 8.1
-
getVcsCheckoutdirStateFiles
@NotNull File[] getVcsCheckoutdirStateFiles()
- Returns:
- array of xml files with vcs revision informations available on current agent
- Since:
- 8.1
-
validateParameters
void validateParameters() throws BuildAgentStartFailedException
Validated build agent configuration.- Throws:
BuildAgentStartFailedException
- if validation is failed
-
getServerProxyHost
@Nullable String getServerProxyHost()
- Returns:
- proxy host that should be used for connections to TeamCity Server, or null of no proxy should be used
-
getServerProxyPort
int getServerProxyPort()
- Returns:
- proxy port that should be used for connections to TeamCity Server, or -1 if default port should be used.
- See Also:
getServerProxyHost()
-
getServerProxyCredentials
@Nullable SimpleCredentials getServerProxyCredentials()
- Returns:
- proxy login/password pair that should be used for connection to TeamCity Server, or null if proxy doesn't requre authentication
- See Also:
getServerProxyHost()
-
isLoadingToolsOnDemandAllowing
boolean isLoadingToolsOnDemandAllowing()
- Returns:
- true if agent can download tools which support loading on demand at runtime, false otherwise
- Since:
- 2019.1
-
-