Interface AgentBuildSettings

    • Method Detail

      • getProjectName

        java.lang.String getProjectName()
        Returns name of the project (on the moment of build starting)
        Returns:
        name of the project
        Since:
        4.0
      • getBuildTypeId

        @NotNull
        java.lang.String getBuildTypeId()
        Returns internal build configuration id
        Returns:
        internal build configuration id
        Since:
        4.0
      • getBuildTypeExternalId

        @NotNull
        java.lang.String getBuildTypeExternalId()
        Returns external build configuration id
        Returns:
        external build configuration id
        Since:
        8.1
      • getBuildTypeName

        java.lang.String getBuildTypeName()
        Returns name of build configuration (on the moment of build starting)
        Returns:
        name of build configuration
        Since:
        4.0
      • getBuildId

        long getBuildId()
        Returns id of the build
        Returns:
        build id
        Since:
        4.0
      • isCleanBuild

        boolean isCleanBuild()
        Returns true if files should be cleaned before build
        Returns:
        see above
        Since:
        4.0
      • isPersonal

        boolean isPersonal()
        Returns true if build is personal
        Returns:
        see above
        Since:
        4.0
      • isPersonalPatchAvailable

        boolean isPersonalPatchAvailable()
        Returns:
        true if this personal build has personal patch.
        Since:
        6.5
      • isCheckoutOnAgent

        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. It is possible if checkout type setting is set to AUTO and is resolved to the Agent-Side checkout.
        Since:
        4.0
        See Also:
        getCheckoutType()
      • isCheckoutOnServer

        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. It is possible if checkout type setting is set to AUTO and is resolved to the Server-Side checkout.
        Since:
        4.0
        See Also:
        getCheckoutType()
      • getExecutionTimeoutMinutes

        long getExecutionTimeoutMinutes()
        Returns build execution timeout in minutes, 0 indicates that there is no limit
        Returns:
        build execution timeout
        Since:
        4.0
      • getArtifactDependencies

        @NotNull
        java.util.List<ArtifactDependencyInfo> getArtifactDependencies()
        Returns artifact dependencies
        Returns:
        artifact dependencies
        Since:
        4.0
      • getAccessUser

        @NotNull
        java.lang.String getAccessUser()
        Get user name to be used to execute authenticated requests on behalf of build to TeamCity server. For password see getAccessCode()
        Returns:
        user name
        Since:
        7.1
        See Also:
        getAccessCode()
      • getAccessCode

        @NotNull
        java.lang.String getAccessCode()
        Returns build access code used to download artifacts
        Returns:
        build access code
        Since:
        4.0
        See Also:
        getAccessUser()
      • getVcsRootEntries

        @NotNull
        java.util.List<VcsRootEntry> getVcsRootEntries()
        Returns VCS root entries associated with this build, i.e. build configuration VCS root entries on the moment of build starting.
        Returns:
        see above
        Since:
        4.0
      • getBuildCurrentVersion

        java.lang.String getBuildCurrentVersion​(@NotNull
                                                VcsRoot vcsRoot)
        Returns current version of the specified VCS root
        Parameters:
        vcsRoot - VCS root
        Returns:
        see above
        Since:
        4.0
      • getBuildPreviousVersion

        @Deprecated
        java.lang.String getBuildPreviousVersion​(@NotNull
                                                 VcsRoot vcsRoot)
        Deprecated.
        see jetbrains.buildServer.agent.impl.vcs.AgentWorkDirRevisionManager#getCurrentState(jetbrains.buildServer.agent.AgentRunningBuild)
        Returns previous version of the specified VCS root
        Parameters:
        vcsRoot - VCS root
        Returns:
        see above
        Since:
        4.0
      • isCustomCheckoutDirectory

        boolean isCustomCheckoutDirectory()
        Returns true if custom checkout directory is specified.
        Returns:
        true if custom checkout directory is specified
        Since:
        4.0
      • getVcsChanges

        @NotNull
        java.util.List<VcsChangeInfo> getVcsChanges()
        Returns list of changed files in this build (excluding files modified in personal changelist if build is personal)
        Returns:
        list of changed files in this build (excluding personal changes)
        Since:
        4.0
      • getPersonalVcsChanges

        @NotNull
        java.util.List<VcsChangeInfo> getPersonalVcsChanges()
        Returns list of changed files modified in personal changelist (if build is non personal returns empty list)
        Returns:
        list of changed files modified in personal changelist
        Since:
        4.0
      • getBuildLogger

        @NotNull
        BuildProgressLogger getBuildLogger()
        Returns logger which can be used to log messages to the build log on server.
        Returns:
        logger for various build messages
        Since:
        4.0
      • getAgentConfiguration

        @NotNull
        BuildAgentConfiguration getAgentConfiguration()
        Build agent configuration of the build agent.
        Returns:
        build agent configuration of the build agent
        Since:
        4.0
      • getBuildTypeOptionValue

        <T> T getBuildTypeOptionValue​(@NotNull
                                      Option<T> option)
        Returns value of the specified build configuration option
        Type Parameters:
        T - type of the value
        Parameters:
        option - build configuration option
        Returns:
        value
        Since:
        4.5
      • getDefaultCheckoutDirectory

        @Deprecated
        @NotNull
        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)
        Returns:
        default checkout directory which will be used if custom checkout directory is not specified.
        Since:
        7.0
      • getVcsSettingsHashForCheckoutMode

        @NotNull
        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.
        Parameters:
        agentCheckoutMode - how checkout will be performed
        Since:
        10.0
      • getBuildRunners

        @NotNull
        java.util.List<BuildRunnerSettings> getBuildRunners()
        Returns:
        list of build runners settings associated with this build
        Since:
        2017.2