com.atlassian.bamboo.build
Interface BuildExecutionManager

All Superinterfaces:
BuildExecutionUpdateManager, BuildLoggerManager
All Known Implementing Classes:
DefaultBuildExecutionManager

@ThreadSafe
public interface BuildExecutionManager
extends BuildExecutionUpdateManager

A class that is aware of all the goings on in executing builds.


Method Summary
 CurrentlyBuilding addToCurrentlyBuilding(BuildContext buildContext)
          Denotes that the passed build context is beginning the build process.
 void execute(BuildContext buildContext)
          Executes the given BuildContext At this point a BuildResultsSummary exists that matches the given BuildContext
 void finishBuild(PlanResultKey planResultKey)
          Calls removeCurrentlyBuilding & finishProcess
 CurrentlyBuilding getBuildRunningOnAgent(java.lang.Long buildAgentId)
           
 java.util.List<CurrentlyBuilding> getCurrentlyBuilding(java.lang.String planKey)
           
 CurrentlyBuilding getCurrentlyBuildingByBuildResult(BuildIdentifier buildIdentifier)
          Returns CurrentlyBuilding instance for build identifier (or BuildContext).
 CurrentlyBuilding getCurrentlyBuildingByBuildResultKey(java.lang.String buildResultKey)
          Returns CurrentlyBuilding instance for build identified by buildResultKey.
 java.util.List<CurrentlyBuilding> getCurrentlyExecutingBuilds()
          Retrieves a list of all builds being executed (i.e not just queued).
 java.util.List<CurrentlyBuilding> getCurrentlyExecutingBuilds(java.lang.String planKey)
          Retrieves a list of all builds being executed (i.e not just queued) that belong to the specified planKey.
 CurrentlyBuilding removeCurrentlyBuilding(java.lang.String planKey)
           
 void setCurrentlyBuilding(BuildContext buildContext, java.util.Collection<BuildAgent> executableAgents, java.util.Collection<ElasticImageConfiguration> executableImages)
          Denotes that the passed build context is beginning the build process.
 BuildRequestResult tryToDetectAndBuild(java.lang.String planKey, BuildDetectionAction buildDetectionAction)
          Will fire off BuildTriggeredEvent if the callback completes successfully and a BuildRequestResult is returned by the callback action.
 
Methods inherited from interface com.atlassian.bamboo.build.BuildExecutionUpdateManager
setBuildFinish, setBuildRunningOnAgent, setBuildStart, setBuildStopAcknowledge
 
Methods inherited from interface com.atlassian.bamboo.build.BuildLoggerManager
getBuildLogger, getBuildLogger, getBuildLogger, removeBuildLogger, removeBuildLogger
 

Method Detail

getCurrentlyExecutingBuilds

@NotNull
java.util.List<CurrentlyBuilding> getCurrentlyExecutingBuilds()
Retrieves a list of all builds being executed (i.e not just queued).

Returns:

getCurrentlyExecutingBuilds

@NotNull
java.util.List<CurrentlyBuilding> getCurrentlyExecutingBuilds(java.lang.String planKey)
Retrieves a list of all builds being executed (i.e not just queued) that belong to the specified planKey.

Parameters:
planKey -
Returns:

getCurrentlyBuilding

@NotNull
java.util.List<CurrentlyBuilding> getCurrentlyBuilding(@NotNull
                                                               java.lang.String planKey)

removeCurrentlyBuilding

@Nullable
CurrentlyBuilding removeCurrentlyBuilding(@NotNull
                                                   java.lang.String planKey)

setCurrentlyBuilding

void setCurrentlyBuilding(@NotNull
                          BuildContext buildContext,
                          @NotNull
                          java.util.Collection<BuildAgent> executableAgents,
                          @NotNull
                          java.util.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.

addToCurrentlyBuilding

CurrentlyBuilding addToCurrentlyBuilding(@NotNull
                                         BuildContext buildContext)
Denotes that the passed build context is beginning the build process. (i.e. it's being queued).

Parameters:
buildContext -

getBuildRunningOnAgent

@Nullable
CurrentlyBuilding getBuildRunningOnAgent(@NotNull
                                                  java.lang.Long buildAgentId)

finishBuild

void finishBuild(@NotNull
                 PlanResultKey planResultKey)
Calls removeCurrentlyBuilding & finishProcess

Parameters:
planResultKey - identifies plan result

execute

void execute(@NotNull
             BuildContext buildContext)
Executes the given BuildContext At this point a BuildResultsSummary exists that matches the given BuildContext

Parameters:
buildContext -

tryToDetectAndBuild

@NotNull
BuildRequestResult tryToDetectAndBuild(@NotNull
                                               java.lang.String planKey,
                                               @NotNull
                                               BuildDetectionAction buildDetectionAction)
Will fire off BuildTriggeredEvent if the callback completes successfully and a BuildRequestResult is returned by the callback action. Will log reasons if/why it failed to build logs.

Parameters:
planKey -
buildDetectionAction -
Returns:
buildRequestResult

getCurrentlyBuildingByBuildResultKey

@Nullable
CurrentlyBuilding getCurrentlyBuildingByBuildResultKey(@NotNull
                                                                java.lang.String buildResultKey)
Returns CurrentlyBuilding instance for build identified by buildResultKey. Should be used only if BuildIdentifier is not available - basically in actions

Parameters:
buildResultKey -
Returns:

getCurrentlyBuildingByBuildResult

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

Parameters:
buildIdentifier -
Returns:


Copyright © 2012 Atlassian. All Rights Reserved.