public class DefaultBuildExecutionManager extends Object implements BuildExecutionManager
postConstruct()
Constructor and Description |
---|
DefaultBuildExecutionManager(org.quartz.Scheduler scheduler) |
Modifier and Type | Method and Description |
---|---|
void |
detachBuildFromAgent(long agentId)
Detaches runnin build (if any) from an agent that was assigned to it.
|
void |
execute(@NotNull BuildContext buildContext)
Executes the given
BuildContext
At this point a BuildResultsSummary exists that matches the given BuildContext |
void |
finishBuild(@NotNull PlanResultKey planResultKey,
boolean updateFollowingBuilds)
Calls removeCurrentlyBuilding and finishProcess
|
void |
finishBuildWithCleanState(@NotNull PlanResultKey planResultKey,
@NotNull BuildContext buildContext)
Calls removeCurrentlyBuilding and finishProcess.
|
@Nullable CurrentlyBuilding |
getBuildRunningOnAgent(@NotNull Long buildAgentId) |
@NotNull List<CurrentlyBuilding> |
getCurrentlyBuilding(@NotNull Key key) |
@Nullable CurrentlyBuilding |
getCurrentlyBuildingByBuildResult(@NotNull BuildIdentifier buildIdentifier)
Returns
CurrentlyBuilding instance for build identifier (or BuildContext ). |
@Nullable CurrentlyBuilding |
getCurrentlyBuildingByPlanResultKey(@NotNull ResultKey resultKey)
Returns
CurrentlyBuilding instance for build identified by buildResultKey. |
@NotNull Iterable<CurrentlyBuilding> |
getCurrentlyExecuting()
Retrieves a all builds being executed (i.e not just queued).
|
Iterable<CurrentlyBuilding> |
getCurrentlyExecuting(PlanKey planKey) |
void |
onExecutionCancelledTimingPoint(BuildTimingPoints.ExecutionCancelled event) |
void |
onExecutionFinishedTimingPoint(BuildTimingPoints.ExecutionFinished event) |
void |
onExecutionStartedTimingPoint(BuildTimingPoints.ExecutionStarted event) |
void |
onQueuedTimingPoint(BuildTimingPoints.Queued event) |
void |
onVcsSyncStartedTimingPoint(BuildTimingPoints.VcsSyncStarted event) |
@Nullable CurrentlyBuilding |
removeCurrentlyBuilding(@NotNull ResultKey resultKey) |
void |
setAuthorCreatorService(AuthorCreatorService authorCreatorService) |
void |
setBuildLoggerManager(BuildLoggerManager buildLoggerManager) |
void |
setCachedPlanManager(CachedPlanManager cachedPlanManager) |
void |
setCurrentlyBuilding(@NotNull BuildContext buildContext,
@NotNull Collection<BuildAgent> executableAgents,
@NotNull Collection<ElasticImageConfiguration> executableImages)
Denotes that the passed build context is beginning the build process.
|
void |
setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher) |
void |
setPlanStatePersisterService(PlanStatePersisterService planStatePersisterService) |
void |
setResultsSummaryManager(ResultsSummaryManager resultsSummaryManager) |
public DefaultBuildExecutionManager(org.quartz.Scheduler scheduler)
public void execute(@NotNull @NotNull BuildContext buildContext)
BuildExecutionManager
BuildContext
At this point a BuildResultsSummary
exists that matches the given BuildContext
execute
in interface BuildExecutionManager
@NotNull public @NotNull Iterable<CurrentlyBuilding> getCurrentlyExecuting()
BuildExecutionManager
getCurrentlyExecuting
in interface BuildExecutionManager
public Iterable<CurrentlyBuilding> getCurrentlyExecuting(PlanKey planKey)
getCurrentlyExecuting
in interface BuildExecutionManager
@NotNull public @NotNull List<CurrentlyBuilding> getCurrentlyBuilding(@NotNull @NotNull Key key)
getCurrentlyBuilding
in interface BuildExecutionManager
@Nullable public @Nullable CurrentlyBuilding getCurrentlyBuildingByPlanResultKey(@NotNull @NotNull ResultKey resultKey)
BuildExecutionManager
CurrentlyBuilding
instance for build identified by buildResultKey.
Should be used only if BuildIdentifier
is not available - basically in actionsgetCurrentlyBuildingByPlanResultKey
in interface BuildExecutionManager
@Nullable public @Nullable CurrentlyBuilding getCurrentlyBuildingByBuildResult(@NotNull @NotNull BuildIdentifier buildIdentifier)
BuildExecutionManager
CurrentlyBuilding
instance for build identifier (or BuildContext
).getCurrentlyBuildingByBuildResult
in interface BuildExecutionManager
public void setCurrentlyBuilding(@NotNull @NotNull BuildContext buildContext, @NotNull @NotNull Collection<BuildAgent> executableAgents, @NotNull @NotNull 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.@Nullable public @Nullable CurrentlyBuilding getBuildRunningOnAgent(@NotNull @NotNull Long buildAgentId)
getBuildRunningOnAgent
in interface BuildExecutionManager
public void detachBuildFromAgent(long agentId)
BuildExecutionManager
detachBuildFromAgent
in interface BuildExecutionManager
public void finishBuildWithCleanState(@NotNull @NotNull PlanResultKey planResultKey, @NotNull @NotNull BuildContext buildContext)
BuildExecutionManager
#finishBuild(PlanResultKey)
instead.finishBuildWithCleanState
in interface BuildExecutionManager
planResultKey
- identifies plan resultpublic void finishBuild(@NotNull @NotNull PlanResultKey planResultKey, boolean updateFollowingBuilds)
BuildExecutionManager
finishBuild
in interface BuildExecutionManager
planResultKey
- identifies plan result@Nullable public @Nullable CurrentlyBuilding removeCurrentlyBuilding(@NotNull @NotNull ResultKey resultKey)
removeCurrentlyBuilding
in interface BuildExecutionManager
@EventListener public void onQueuedTimingPoint(@NotNull BuildTimingPoints.Queued event)
@EventListener public void onVcsSyncStartedTimingPoint(@NotNull BuildTimingPoints.VcsSyncStarted event)
@EventListener public void onExecutionStartedTimingPoint(@NotNull BuildTimingPoints.ExecutionStarted event)
@EventListener public void onExecutionCancelledTimingPoint(@NotNull BuildTimingPoints.ExecutionCancelled event)
@EventListener public void onExecutionFinishedTimingPoint(@NotNull BuildTimingPoints.ExecutionFinished event)
public void setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher)
public void setResultsSummaryManager(ResultsSummaryManager resultsSummaryManager)
public void setBuildLoggerManager(BuildLoggerManager buildLoggerManager)
public void setAuthorCreatorService(AuthorCreatorService authorCreatorService)
public void setPlanStatePersisterService(PlanStatePersisterService planStatePersisterService)
public void setCachedPlanManager(CachedPlanManager cachedPlanManager)
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.