Interface AgentRunningBuild

  • All Superinterfaces:
    AgentBuildSettings, jetbrains.buildServer.log.Loggable

    public interface AgentRunningBuild
    extends AgentBuildSettings, jetbrains.buildServer.log.Loggable
    Represents running build on the agent side
    • Method Detail

      • getCheckoutDirectory

        @NotNull
        java.io.File getCheckoutDirectory()
        Returns checkout directory: directory where checkout is performed
        Returns:
        see above
      • getWorkingDirectory

        @NotNull
        @Deprecated
        java.io.File getWorkingDirectory()
        Deprecated.
        use BuildRunnerContext.getWorkingDirectory() this method returns working directory of first build runner.
        Returns build working directory: working directory where build runner started
        Returns:
        see above
      • getArtifactsPaths

        @Nullable
        java.lang.String getArtifactsPaths()
        Returns artifacts paths specified for build. This value is always resolved in runtime
        Returns:
        artifacts paths
      • getFailBuildOnExitCode

        boolean getFailBuildOnExitCode()
        Property is defined by build configuration settings to define the way build runner should process build process exit code.
        Returns:
        true if build runner is expected to fail build if build process returned non-zero exit code
      • getRunnerParameters

        @NotNull
        @Deprecated
        java.util.Map<java.lang.String,​java.lang.String> getRunnerParameters()
        Deprecated.
        use BuildRunnerContext.getRunnerParameters()} returns runner parameters of currently selected build runner
        Returns unmodifiable map of runner parameters with all references expanded
        Returns:
        see above
        Since:
        5.1
      • getBuildNumber

        @NotNull
        java.lang.String getBuildNumber()
        Returns current build number. Note that during the build, build number may change (i.e. build script can emit ##teamcity[buildNumber ''] service message. Because of this, it is safer to read build number before build is finished (when build process is not working anymore).
        Returns:
        current build number
        Since:
        5.1.1
      • getSharedParametersResolver

        @NotNull
        ValueResolver getSharedParametersResolver()
        Creates value resolver for parameters resolution in strings. The resolution rules are the same as for build parameters
        Returns:
        value resolver to perform resolution of all parameters references within string
        Since:
        6.0
      • getBuildFeatures

        @NotNull
        java.util.Collection<AgentBuildFeature> getBuildFeatures()
        Returns:
        collection of enabled build features for the build
        Since:
        7.0
      • getBuildFeaturesOfType

        @NotNull
        java.util.Collection<AgentBuildFeature> getBuildFeaturesOfType​(@NotNull
                                                                       java.lang.String type)
        Parameters:
        type - type to filter features
        Returns:
        collection of enabled build features for the build
        Since:
        7.0
      • getInterruptReason

        @Nullable
        BuildInterruptReason getInterruptReason()
        Use this method to check if build is interrupted.
        Returns:
        current build interrupt reason or null if build is not interrupted
        Since:
        7.1
      • interruptBuild

        void interruptBuild​(@NotNull
                            java.lang.String comment,
                            boolean reQueue)
        Interrupt and cancel running build.
        Parameters:
        comment - will be used as a canceling comment for the build
        reQueue - if true, build should be re-queued on the server side
        Since:
        2019.1
      • isBuildFailingOnServer

        boolean isBuildFailingOnServer()
                                throws java.lang.InterruptedException
        Make synchronous call to the build server and check if the build is failing there
        Returns:
        true if the build is failing on server
        Throws:
        java.lang.InterruptedException - if the request cannot be completed (for instance, the build is no longer present on the server)
        Since:
        8.0
      • getPasswordReplacer

        @NotNull
        PasswordReplacer getPasswordReplacer()
        Returns:
        instance of PasswordReplacer which can be used to replace passwords known to current build in different logs or files
        Since:
        2017.1
      • getArtifactStorageSettings

        @NotNull
        java.util.Map<java.lang.String,​java.lang.String> getArtifactStorageSettings()
        Returns:
        artifact storage settings if there are any available for this build
        Since:
        2017.1