@Internal
public interface ChainState
Chain
stateModifier and Type | Method and Description |
---|---|
void |
finishStopping()
Marks the
Chain as finished stopping. |
long |
getAverageDuration()
Average duration of the
Chain in milliseconds |
BuildContext |
getBuildContext()
The
BuildContext of the currently executing chain |
com.atlassian.bamboo.chains.ChainBuildState |
getChainBuildState(PlanResultKey planResultKey)
Gets the build state for the given buildResultKey
|
Collection<com.atlassian.bamboo.chains.ChainBuildState> |
getChainBuildStates()
Gets all the
ChainBuildState s for the current ChainState |
StageState |
getCurrentStage()
Gets the currently executing
StageState |
int |
getCurrentStageNumber()
Returns the cardinal number of currently executed stage.
|
long |
getElapsedTime()
Time taken to execute the
Chain in milliseconds |
ExecutionContext |
getExecutionContext()
Stores contextual data for the current
ChainState |
MergeResultSummary |
getMergeResult() |
VcsWorkingCopy |
getMergeWorkingCopy() |
String |
getName()
Get Chain name
|
StageState |
getNextStage()
Get the next stage
|
PlanExecutionConfig.PlanExecutionType |
getPlanExecutionType()
How this chain was executed, i.e.
|
PlanResultKey |
getPlanResultKey()
PlanResultKey for the the Chain execution |
StageState |
getPreviousStage()
Gets the currently executing
StageState |
Date |
getQueueTime()
The queue
Date |
List<StageState> |
getStages()
Get all stages for Chain
|
Date |
getStartDate()
The start
Date |
boolean |
isCompleted()
Checks if the
Chain has been completed |
boolean |
isContinuable()
true if user will be able to manually continue the build after this execution ends
|
boolean |
isFailed()
Checks if the
Chain has failed |
boolean |
isGoingToStopAtManualStage()
true if the successfully finished chain is expected to stop at the (proceeding) manual stage
|
boolean |
isStopping()
Checks if the
Chain is stopping |
boolean |
isStopRequested()
Checks if the
Chain has been requested to stop executing |
boolean |
isSuccessful()
Checks if the
Chain has successfully completed |
void |
markAsStopping()
Marks the
Chain as stopping |
StageState |
proceedToNextStage(com.google.common.collect.Multimap<String,Artifact> publishedChainArtifacts,
boolean lastExecutedStageSuccessful)
Replaces the current stage with the next stage in the queue and changes the reference to the current stage to the previous.
|
void |
setMergeResult(MergeResultSummary mergeResult) |
void |
setMergeWorkingCopy(VcsWorkingCopy workingCopy) |
void |
setStartDate(Date date)
The first call sets the start
Date . |
void |
updateVariableContext(VariableContext variableContext) |
@NotNull String getName()
@NotNull PlanResultKey getPlanResultKey()
PlanResultKey
for the the Chain
execution@NotNull List<StageState> getStages()
@Nullable com.atlassian.bamboo.chains.ChainBuildState getChainBuildState(@NotNull PlanResultKey planResultKey)
planResultKey
- @NotNull Collection<com.atlassian.bamboo.chains.ChainBuildState> getChainBuildStates()
ChainBuildState
s for the current ChainState
@Nullable StageState getPreviousStage()
StageState
@Nullable StageState getCurrentStage()
StageState
int getCurrentStageNumber()
StageState getNextStage()
StageState proceedToNextStage(@NotNull com.google.common.collect.Multimap<String,Artifact> publishedChainArtifacts, boolean lastExecutedStageSuccessful)
boolean isCompleted()
Chain
has been completedboolean isSuccessful()
Chain
has successfully completedboolean isFailed()
Chain
has failedboolean isStopping()
Chain
is stoppingboolean isStopRequested()
Chain
has been requested to stop executingvoid markAsStopping()
Chain
as stoppingvoid finishStopping()
Chain
as finished stopping.@NotNull BuildContext getBuildContext()
BuildContext
of the currently executing chain@NotNull ExecutionContext getExecutionContext()
ChainState
long getAverageDuration()
Chain
in millisecondsvoid setStartDate(@NotNull Date date)
Date
. Subsequent calls have no effect.date
- long getElapsedTime()
Chain
in milliseconds@NotNull PlanExecutionConfig.PlanExecutionType getPlanExecutionType()
boolean isGoingToStopAtManualStage()
boolean isContinuable()
@Nullable MergeResultSummary getMergeResult()
void setMergeResult(@NotNull MergeResultSummary mergeResult)
void updateVariableContext(@NotNull VariableContext variableContext)
@Nullable VcsWorkingCopy getMergeWorkingCopy()
void setMergeWorkingCopy(VcsWorkingCopy workingCopy)
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.