|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@ThreadSafe public interface BuildExecutionManager
A class that is aware of all the goings on in executing builds.
Field Summary | |
---|---|
static long |
DEFAULT_WAITTIME
|
Method Summary | |
---|---|
void |
addToCurrentlyBuilding(BuildContext buildContext)
Denotes that the passed build context is beginning the build process. |
void |
execute(BuildContext buildContext)
Checks if the Build is already building and if successful executes the BuildContext
At this point a BuildResultsSummary that matches the given BuildContext |
void |
finishBuild(java.lang.String buildResultKey)
Calls removeCurrentlyBuilding & finishProcess |
void |
finishProcess(java.lang.String buildKey)
Unmark the build for processing |
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). |
boolean |
isBeingProcessed(java.lang.String buildKey)
Checks if this buildKey is being actively processed |
CurrentlyBuilding |
removeCurrentlyBuilding(java.lang.String planKey)
|
void |
setCurrentlyBuilding(BuildContext buildContext,
java.util.Collection<BuildAgent> executableAgents)
Deprecated. - does not initialize executable images |
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. |
void |
startManualBuild(Build buildPlan,
com.atlassian.user.User user)
|
void |
startManualBuild(Build buildPlan,
com.atlassian.user.User user,
java.util.Map<java.lang.String,java.lang.String> params)
|
boolean |
tryToBuild(java.lang.String planKey,
boolean wait)
Attempts to build the passed planKey. |
boolean |
tryToDetectAndBuild(java.lang.String planKey,
BuildDetectionAction buildDetectionAction,
boolean waitForProcessLock)
Wraps up the passed callback BuildDetectionAction in a process lock, and also a check for currentlyBuilding. |
boolean |
tryToProcess(java.lang.String buildKey)
Attempts to gain control to process the build. |
boolean |
waitToProcess(java.lang.String planKey)
Attempts to process the plan for up to DEFAULT_WAITTIME time. |
Methods inherited from interface com.atlassian.bamboo.build.BuildExecutionUpdateManager |
---|
setBuildFinish, setBuildRunningOnAgent, setBuildStart |
Methods inherited from interface com.atlassian.bamboo.build.BuildLoggerManager |
---|
getBuildLogger, getBuildLogger, getBuildLogger, removeBuildLogger, removeBuildLogger |
Field Detail |
---|
static final long DEFAULT_WAITTIME
Method Detail |
---|
boolean isBeingProcessed(@NotNull java.lang.String buildKey)
buildKey
-
boolean tryToProcess(@NotNull java.lang.String buildKey)
buildKey
-
void finishProcess(@NotNull java.lang.String buildKey)
buildKey
- java.util.List<CurrentlyBuilding> getCurrentlyExecutingBuilds()
@NotNull java.util.List<CurrentlyBuilding> getCurrentlyBuilding(@NotNull java.lang.String planKey)
@Nullable CurrentlyBuilding removeCurrentlyBuilding(@NotNull java.lang.String planKey)
boolean waitToProcess(@NotNull java.lang.String planKey)
DEFAULT_WAITTIME
time. You can force the method to abort and return
by calling Thread.interrupt()
planKey
-
void setCurrentlyBuilding(@NotNull BuildContext buildContext, @NotNull java.util.Collection<BuildAgent> executableAgents, @NotNull java.util.Collection<ElasticImageConfiguration> executableImages)
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.@Deprecated void setCurrentlyBuilding(@NotNull BuildContext buildContext, @NotNull java.util.Collection<BuildAgent> executableAgents)
buildContext
- executableAgents
- - a list of agents on which this build can be run.void addToCurrentlyBuilding(@NotNull BuildContext buildContext)
buildContext
- CurrentlyBuilding getBuildRunningOnAgent(@NotNull java.lang.Long buildAgentId)
boolean tryToBuild(@NotNull java.lang.String planKey, boolean wait)
#isAllowBuilding(String)
, getCurrentlyBuilding(String)
and tryToProcess(String)
. If the call returns true, you also have the "lock" on the plan.
planKey
- wait
- should it return fast, or wait if can't get the lock
void finishBuild(@NotNull java.lang.String buildResultKey)
buildResultKey
- void execute(@NotNull BuildContext buildContext)
BuildContext
At this point a BuildResultsSummary
that matches the given BuildContext
buildContext
- boolean tryToDetectAndBuild(@NotNull java.lang.String planKey, @NotNull BuildDetectionAction buildDetectionAction, boolean waitForProcessLock)
BuildDetectionAction
in a process lock, and also a check for currentlyBuilding.
Will fire off BuildTriggeredEvent
if the callback completes successfully and a BuildContext
is returned
by the callback action.
planKey
- buildDetectionAction
- waitForProcessLock
-
void startManualBuild(@NotNull Build buildPlan, @NotNull com.atlassian.user.User user)
void startManualBuild(@NotNull Build buildPlan, @NotNull com.atlassian.user.User user, @NotNull java.util.Map<java.lang.String,java.lang.String> params)
CurrentlyBuilding getCurrentlyBuildingByBuildResultKey(@NotNull java.lang.String buildResultKey)
CurrentlyBuilding
instance for build identified by buildResultKey.
Should be used only if BuildIdentifier
is not available - basically in actions
buildResultKey
-
CurrentlyBuilding getCurrentlyBuildingByBuildResult(@NotNull BuildIdentifier buildIdentifier)
CurrentlyBuilding
instance for build identifier (or BuildContext
).
buildIdentifier
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |