Interface AgentRunningBuildEx

    • Method Detail

      • relyOnVcsToRestoreFromErrors

        boolean relyOnVcsToRestoreFromErrors()
        Returns:
        true if agent-side checkout is used and an option to rely on VCS to restore from errors is set
        Since:
        9.1.4
      • getCurrentRunnerContext

        @NotNull
        BuildRunnerContextEx getCurrentRunnerContext()
        Returns:
        build context. This context is shared between all build runners BuildRunnerContext of the build. You may use this context to read/write build-wide parameters. Every time this method returns same object reference. BuildRunnerContext interface may be used to update parameters for one build runner.
        Since:
        6.0
        See Also:
        BuildRunnerContext
      • getBuildContext

        @NotNull
        BuildContextEx getBuildContext()
        Since:
        6.0
      • updateBuildNumber

        void updateBuildNumber​(@NotNull
                               String newBuildNumber)
      • setPreparationDone

        void setPreparationDone()
      • isPreparationDone

        boolean isPreparationDone()
      • getPerBuildService

        @Nullable
        <T> T getPerBuildService​(Class<T> clazz)
        Service locator for per-build components
        Type Parameters:
        T - type if instance
        Parameters:
        clazz - class of component to return
        Returns:
        per-build component instance
        Since:
        6.0
      • setInAlwaysExecutingStage

        void setInAlwaysExecutingStage​(boolean enable)
      • getVcsSettingsHash

        @NotNull
        String getVcsSettingsHash()
        Returns hash of all vcs instance settings. Required to determine on agent side whether vcs settings were changed or not.
        Returns:
        hash of all vcs settings.
        Since:
        8.1
      • getCheckoutDirRevisionInfo

        @NotNull
        AgentCheckoutDirRevisionInfo getCheckoutDirRevisionInfo()
        Returns:
        build checkout directory revision information
        Since:
        8.1
      • cleanCheckoutEnforced

        boolean cleanCheckoutEnforced()
        Indicates whether clean checkout was enforced for a build in designated directory
        Returns:
        true if we should do a clean checkout
        Since:
        8.1
      • clearCheckoutDirRevisions

        void clearCheckoutDirRevisions()
                                throws RunBuildException
        Deletes information about checkout directory revisions preparing directory for clean checkout.
        Since, we don't keep information about revisions on server this will result in clean checkout.
        Throws:
        RunBuildException
        Since:
        2017.1
      • isCheckoutDirDirty

        boolean isCheckoutDirDirty()

        Returns the "dirty" status of the checkout directory.

        Returns:
        the "dirty" status of the checkout directory.
        Since:
        9.1
        See Also:
        setCheckoutDirDirty(boolean)
      • getBuildLogTail

        @NotNull
        BuildLogTail getBuildLogTail()
        Returns:
        build log tail for this build
        Since:
        9.1
      • setDefaultCheckoutDirectory

        void setDefaultCheckoutDirectory​(@NotNull
                                         AgentCheckoutMode checkoutMode)
        Set default checkout directory based on checkout mode that will be used in this build.
        Since:
        10.0
      • getParameterControlDescription

        @Nullable
        ControlDescription getParameterControlDescription​(@NotNull
                                                          String name)
        Returns description object for the corresponding parameter if it is known on the agent.
        Parameters:
        name - parameter name
        Returns:
        control description object which is created from the parameter spec
        Since:
        2023.05
      • getInterruptDetails

        @Nullable
        BuildInterruptDetails getInterruptDetails()
        Returns:
        Detailed information about build interruption (if the build was interrupted)
        Since:
        2019.1
      • setDetachedFromAgent

        void setDetachedFromAgent​(boolean detached)
        Make the agent be detacheced/attached to some build. Detached indicates that the build tasks are finished on the agent but the build itself should continue until some external process finishes it
        Parameters:
        detached - true if agent should be detached from its current build
        Since:
        2019.2
      • isDetachedFromAgent

        boolean isDetachedFromAgent()
        Return detached status of the agent.
        Returns:
        true if the agent is detached from a build; false - otherwise
      • getUnresolvedServerParameters

        Map<String,​String> getUnresolvedServerParameters()
        Return a map of all parameters which came from the TeamCity server
        Returns:
        see above
        Since:
        2020.1
      • cleanParameters

        void cleanParameters()
      • setBuildRunnerToExecute

        void setBuildRunnerToExecute​(int buildRunnerToExecute)
        Sets the number of runner to execute a build step (used for purposes of Executor Mode)
        Parameters:
        buildRunnerToExecute - number of runner to be a build step executor
        Since:
        2023.09