|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.build.DefaultBuildExecutionManager
public class DefaultBuildExecutionManager
Constructor Summary | |
---|---|
DefaultBuildExecutionManager(PlanExecutionPermitter planExecutionPermitter,
org.quartz.Scheduler scheduler)
|
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 |
BuildLogger |
getBuildLogger(PlanKey planKey)
Returns a BuildLogger for the given plan |
BuildLogger |
getBuildLogger(PlanResultKey resultKey)
Returns a BuildLogger for the given result |
BuildLogger |
getBuildLogger(java.lang.String planOrResultKey)
Returns a BuildLogger for the given plan or result key. |
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. |
boolean |
isAllowBuilding(java.lang.String planKey)
Checks if a particular build is allowed to be built. |
void |
removeBuildLogger(PlanKey planKey)
Removes plan logger for given plan key. |
void |
removeBuildLogger(PlanResultKey buildResultKey)
Removes buildLogger for finished build process. |
CurrentlyBuilding |
removeCurrentlyBuilding(java.lang.String planKey)
|
void |
setAuthorCreatorService(AuthorCreatorService authorCreatorService)
|
void |
setBuildFinish(BuildContext buildContext,
TimingPoint timingPoint)
|
void |
setBuildLoggerManager(BuildLoggerManager buildLoggerManager)
|
void |
setBuildResultsSummaryManager(BuildResultsSummaryManager buildResultsSummaryManager)
|
void |
setBuildRunningOnAgent(BuildContext buildContext,
java.lang.Long buildAgentId)
Marks that this plan has started building on the agentId. |
void |
setBuildStart(BuildContext buildContext,
TimingPoint timingPoint)
|
void |
setBuildStopAcknowledge(java.lang.String buildResultKey)
|
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 |
setCurrentlyBuildingContainer(CurrentlyBuildingContainer currentlyBuildingContainer)
|
void |
setErrorUpdateHandler(ErrorUpdateHandler errorUpdateHandler)
|
void |
setEventManager(com.atlassian.event.EventManager eventManager)
|
void |
setLimitedConcurrencyCaller(LimitedConcurrencyCaller limitedConcurrencyCaller)
|
void |
setPendingBuildResultsCleanup(PendingBuildResultsCleanup pendingBuildResultsCleanup)
|
void |
setPlanManager(PlanManager planManager)
|
void |
setPlanStatePersisterService(PlanStatePersisterService planStatePersisterService)
|
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 class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultBuildExecutionManager(PlanExecutionPermitter planExecutionPermitter, org.quartz.Scheduler scheduler)
Method Detail |
---|
public boolean isAllowBuilding(@NotNull java.lang.String planKey)
BuildExecutionManager
isAllowBuilding
in interface BuildExecutionManager
public void execute(@NotNull BuildContext buildContext)
BuildExecutionManager
BuildContext
At this point a BuildResultsSummary
exists that matches the given BuildContext
execute
in interface BuildExecutionManager
@NotNull public BuildRequestResult tryToDetectAndBuild(@NotNull java.lang.String planKey, @NotNull BuildDetectionAction buildDetectionAction)
BuildExecutionManager
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.
tryToDetectAndBuild
in interface BuildExecutionManager
@NotNull public java.util.List<CurrentlyBuilding> getCurrentlyExecutingBuilds()
BuildExecutionManager
getCurrentlyExecutingBuilds
in interface BuildExecutionManager
@NotNull public java.util.List<CurrentlyBuilding> getCurrentlyExecutingBuilds(java.lang.String planKey)
BuildExecutionManager
getCurrentlyExecutingBuilds
in interface BuildExecutionManager
@NotNull public java.util.List<CurrentlyBuilding> getCurrentlyBuilding(@NotNull java.lang.String planKey)
getCurrentlyBuilding
in interface BuildExecutionManager
@NotNull public CurrentlyBuilding getCurrentlyBuildingByBuildResultKey(@NotNull java.lang.String buildResultKey)
BuildExecutionManager
CurrentlyBuilding
instance for build identified by buildResultKey.
Should be used only if BuildIdentifier
is not available - basically in actions
getCurrentlyBuildingByBuildResultKey
in interface BuildExecutionManager
@NotNull public CurrentlyBuilding getCurrentlyBuildingByBuildResult(@NotNull BuildIdentifier buildIdentifier)
BuildExecutionManager
CurrentlyBuilding
instance for build identifier (or BuildContext
).
getCurrentlyBuildingByBuildResult
in interface BuildExecutionManager
public void setCurrentlyBuilding(@NotNull BuildContext buildContext, @NotNull java.util.Collection<BuildAgent> executableAgents, @NotNull java.util.Collection<ElasticImageConfiguration> executableImages)
setCurrentlyBuilding
in interface BuildExecutionManager
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.public CurrentlyBuilding addToCurrentlyBuilding(@NotNull BuildContext buildContext)
addToCurrentlyBuilding
in interface BuildExecutionManager
buildContext
- public void setBuildRunningOnAgent(@NotNull BuildContext buildContext, java.lang.Long buildAgentId)
BuildExecutionUpdateManager
setBuildRunningOnAgent
in interface BuildExecutionUpdateManager
public CurrentlyBuilding getBuildRunningOnAgent(@NotNull java.lang.Long buildAgentId)
getBuildRunningOnAgent
in interface BuildExecutionManager
public void finishBuild(@NotNull PlanResultKey planResultKey)
BuildExecutionManager
finishBuild
in interface BuildExecutionManager
planResultKey
- identifies plan resultpublic CurrentlyBuilding removeCurrentlyBuilding(@NotNull java.lang.String planKey)
removeCurrentlyBuilding
in interface BuildExecutionManager
public void setBuildStart(@NotNull BuildContext buildContext, @NotNull TimingPoint timingPoint)
setBuildStart
in interface BuildExecutionUpdateManager
public void setBuildFinish(@NotNull BuildContext buildContext, @NotNull TimingPoint timingPoint)
setBuildFinish
in interface BuildExecutionUpdateManager
public void setBuildStopAcknowledge(@NotNull java.lang.String buildResultKey)
setBuildStopAcknowledge
in interface BuildExecutionUpdateManager
@NotNull public BuildLogger getBuildLogger(@NotNull PlanKey planKey)
BuildLoggerManager
BuildLogger
for the given plan
getBuildLogger
in interface BuildLoggerManager
@NotNull public BuildLogger getBuildLogger(@NotNull PlanResultKey resultKey)
BuildLoggerManager
BuildLogger
for the given result
getBuildLogger
in interface BuildLoggerManager
@NotNull public BuildLogger getBuildLogger(@NotNull java.lang.String planOrResultKey)
BuildLoggerManager
BuildLogger
for the given plan or result key. If it's detected
that the AgentContext
is building something, passing the plan key String will switch to log to the result log
getBuildLogger
in interface BuildLoggerManager
public void removeBuildLogger(PlanKey planKey)
BuildLoggerManager
removeBuildLogger
in interface BuildLoggerManager
public void removeBuildLogger(PlanResultKey buildResultKey)
BuildLoggerManager
removeBuildLogger
in interface BuildLoggerManager
public void setPlanManager(PlanManager planManager)
public void setEventManager(com.atlassian.event.EventManager eventManager)
public void setErrorUpdateHandler(ErrorUpdateHandler errorUpdateHandler)
public void setBuildResultsSummaryManager(BuildResultsSummaryManager buildResultsSummaryManager)
public void setBuildLoggerManager(BuildLoggerManager buildLoggerManager)
public void setPendingBuildResultsCleanup(PendingBuildResultsCleanup pendingBuildResultsCleanup)
public void setLimitedConcurrencyCaller(LimitedConcurrencyCaller limitedConcurrencyCaller)
public void setAuthorCreatorService(AuthorCreatorService authorCreatorService)
public void setCurrentlyBuildingContainer(CurrentlyBuildingContainer currentlyBuildingContainer)
public void setPlanStatePersisterService(PlanStatePersisterService planStatePersisterService)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |