Interface AgentLifeCycleListener

    • Method Detail

      • beforeAgentConfigurationLoaded

        void beforeAgentConfigurationLoaded​(@NotNull
                                            BuildAgent agent)
        is called before build agent loaded it's properties and it is called before agentInitialized(BuildAgent) This is a right place to detect environment and set agent-wide properties using BuildAgentConfiguration interface
        Parameters:
        agent - agent
      • afterAgentConfigurationLoaded

        void afterAgentConfigurationLoaded​(@NotNull
                                           BuildAgent agent)
        is called after build agent loaded it's properties and it is called before agentInitialized(BuildAgent) This is a right place to update loaded environment and set agent-wide properties using BuildAgentConfiguration interface
        Parameters:
        agent - agent
      • pluginsLoaded

        void pluginsLoaded()
        Called after plugin manager has loaded all plugins.
      • agentStarted

        void agentStarted​(@NotNull
                          BuildAgent agent)
        Called after the agent BuildAgent.start() method
        Parameters:
        agent - build agent
      • agentShutdown

        void agentShutdown()
        Called before agent shutdown
      • buildStarted

        void buildStarted​(@NotNull
                          AgentRunningBuild runningBuild)
        Called after agent receives start build command from the server. To register custom build parameters provide AgentPropertiesExtension agent extension. Note, methods from that interface are called before that method.
        Parameters:
        runningBuild - information about running build
      • sourcesUpdated

        void sourcesUpdated​(@NotNull
                            AgentRunningBuild runningBuild)
        Called when non personal changes are applied to checkout directory. Called after buildStarted(AgentRunningBuild) called. Will not be called if checkout mode is set to manual.
        Parameters:
        runningBuild - current running build
        Since:
        5.1
      • personalPatchApplied

        void personalPatchApplied​(@NotNull
                                  AgentRunningBuild runningBuild)
        Called when personal patch is applied to checkout directory. Will not be called if build is not personal
        Parameters:
        runningBuild - current running build
        Since:
        5.1
      • preparationFinished

        void preparationFinished​(@NotNull
                                 AgentRunningBuild runningBuild)
        Called when all preparations for the build are finished (sources checkout, personal patch, artifact dependencies, free disk space requirement, etc), and build is ready to execute it's steps, if there are any.
        Parameters:
        runningBuild - currently running build
        Since:
        10.0
      • beforeBuildInterrupted

        void beforeBuildInterrupted​(@NotNull
                                    AgentRunningBuild runningBuild,
                                    @NotNull
                                    BuildInterruptReason reason)
        Called before build is forcibly terminated, can be called several times if more than one attempt to terminate build is performed. For example:
        • build execution time limit is exceeded
        • build was stopped from server web UI
        Parameters:
        runningBuild - running build
        reason - reason of build interruption
        Since:
        4.5
      • personalPatchReverted

        void personalPatchReverted​(@NotNull
                                   AgentRunningBuild runningBuild)
        Called when personal patch is reverted Will not be called if build is not personal
        Parameters:
        runningBuild - current running build
        Since:
        5.1
      • afterAtrifactsPublished

        void afterAtrifactsPublished​(@NotNull
                                     AgentRunningBuild runningBuild,
                                     @NotNull
                                     BuildFinishedStatus status)
        Called when all artifacts were published to the server
        Parameters:
        runningBuild - current running build
        status - build status
        Since:
        6.5
      • messageLogged

        void messageLogged​(@NotNull
                           AgentRunningBuild build,
                           @NotNull
                           BuildMessage1 buildMessage)
        Called when a build message logged
        Parameters:
        build - build that received this message
        buildMessage - build message
        Since:
        6.0
      • checkoutDirectoryRemoved

        void checkoutDirectoryRemoved​(@NotNull
                                      java.io.File checkoutDir)
        Called when a build checkout directory was removed from build agent 'work' directory. This can be called when build agent has cleaned up a build checkout directory because it was not used for a long period of time. Checkout directory may not be fully cleaned because of IO errors.
        Parameters:
        checkoutDir - path of the directory. This directory may not exist at the moment of the call.
      • dependenciesDownloaded

        void dependenciesDownloaded​(@NotNull
                                    AgentRunningBuild runningBuild)
        Called when dependencies for the build have been resolved and downloaded successfully
        Parameters:
        runningBuild - current running build
        Since:
        10.0