Interface BuildAgentConfigurationEx

    • Method Detail

      • getAgentConfDirectory

        @NotNull
        File getAgentConfDirectory()
        Returns:
        path to agent conf directory
      • getCacheDirectory

        @NotNull
        File getCacheDirectory()
        Returns path to a folder under BuildAgentConfiguration.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
      • 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