Interface BuildExecutionManager

All Known Implementing Classes:
DefaultBuildExecutionManager

@ThreadSafe public interface BuildExecutionManager
A class that is aware of all the goings on in executing builds.
  • Method Details

    • getCurrentlyExecuting

      @NotNull @NotNull Iterable<CurrentlyBuilding> getCurrentlyExecuting()
      Retrieves a all builds being executed (i.e not just queued).
      Returns:
    • getCurrentlyExecuting

      Iterable<CurrentlyBuilding> getCurrentlyExecuting(PlanKey planKey)
    • getCurrentlyBuilding

      @NotNull @NotNull List<CurrentlyBuilding> getCurrentlyBuilding(@NotNull @NotNull Key key)
    • removeCurrentlyBuilding

      @Nullable @Nullable CurrentlyBuilding removeCurrentlyBuilding(@NotNull @NotNull ResultKey resultKey)
    • setCurrentlyBuilding

      void setCurrentlyBuilding(@NotNull @NotNull BuildContext buildContext, @NotNull @NotNull Collection<BuildAgent> executableAgents, @NotNull @NotNull Collection<ElasticImageConfiguration> executableImages)
      Denotes that the passed build context is beginning the build process. (i.e. it's being queued)
      Parameters:
      buildContext - -
      executableAgents - - a list of agents on which this build can be run.
      executableImages - - a list of images on which the build can be run.
    • getBuildRunningOnAgent

      @Nullable @Nullable CurrentlyBuilding getBuildRunningOnAgent(@NotNull @NotNull Long buildAgentId)
    • finishBuildWithCleanState

      void finishBuildWithCleanState(@NotNull @NotNull PlanResultKey planResultKey, @NotNull @NotNull BuildContext buildContext)
      Calls removeCurrentlyBuilding and finishProcess. This method assumes that result's life cycle state has been updated correctly. If in doubt use #finishBuild(PlanResultKey) instead.
      Parameters:
      planResultKey - identifies plan result
    • finishBuild

      void finishBuild(@NotNull @NotNull PlanResultKey planResultKey, boolean updateFollowingBuilds)
      Calls removeCurrentlyBuilding and finishProcess
      Parameters:
      planResultKey - identifies plan result
      updateFollowingBuilds -
    • detachBuildFromAgent

      void detachBuildFromAgent(long agentId)
      Detaches runnin build (if any) from an agent that was assigned to it. Makes it possible for orphaned build monitor to clean it up. On the other hand, if the build result is returned within grace period it can still be accepted.
      Since:
      8.0
    • execute

      void execute(@NotNull @NotNull BuildContext buildContext)
      Executes the given BuildContext At this point a BuildResultsSummary exists that matches the given BuildContext
      Parameters:
      buildContext -
    • getCurrentlyBuildingByPlanResultKey

      @Nullable @Nullable CurrentlyBuilding getCurrentlyBuildingByPlanResultKey(@NotNull @NotNull ResultKey resultKey)
      Returns CurrentlyBuilding instance for build identified by buildResultKey. Should be used only if BuildIdentifier is not available - basically in actions
      Parameters:
      resultKey -
      Returns:
    • getCurrentlyBuildingByBuildResult

      @Nullable @Nullable CurrentlyBuilding getCurrentlyBuildingByBuildResult(@NotNull @NotNull BuildIdentifier buildIdentifier)
      Returns CurrentlyBuilding instance for build identifier (or BuildContext).
      Parameters:
      buildIdentifier -
      Returns: