Package com.atlassian.bamboo.chains
Interface ChainBuildState
@Internal
public interface ChainBuildState
Manages the State of the running
Chain
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addResultVariablesFromPreviousStages
(Map<String, VariableDefinitionContext> resultVariables) Updates build context of the jobs in with result variables collected in previous stage(s).long
@NotNull BuildContext
Gets the BuildContext for the Task@NotNull PlanResultKey
PlanResultKey
for the currentChain
@NotNull StageState
Returns theStageState
that thisChainBuildState
belongs togetState()
boolean
Is the Task in the Dispatched stateboolean
isFailed()
Was the tasks execution a failureboolean
Is the Task in the Finalized stateboolean
Was the tasks execution successful or not?boolean
Is the Task in the Waiting statevoid
Sets the State toChainBuildState.State.DISPATCHED
void
markAsFinalized
(BuildState buildState) Sets the State toChainBuildState.State.FINALIZED
void
setPublishedChainArtifactsInfo
(@NotNull Multimap<String, Artifact> publishedChainArtifacts) Updates build context of the jobs with artifacts published in previous stage(s).
-
Method Details
-
getPlanResultKey
PlanResultKey
for the currentChain
- Returns:
- planResultKey
-
getStageState
Returns theStageState
that thisChainBuildState
belongs to- Returns:
- stageState
-
markAsDispatched
void markAsDispatched()Sets the State toChainBuildState.State.DISPATCHED
-
markAsFinalized
Sets the State toChainBuildState.State.FINALIZED
- Parameters:
buildState
-
-
getState
BuildState getState()- Returns:
- the current BuildState for this Job.
-
isWaiting
boolean isWaiting()Is the Task in the Waiting state- Returns:
-
isDispatched
boolean isDispatched()Is the Task in the Dispatched state- Returns:
-
isFinalized
boolean isFinalized()Is the Task in the Finalized state- Returns:
-
isSuccessful
boolean isSuccessful()Was the tasks execution successful or not?- Returns:
- success
-
isFailed
boolean isFailed()Was the tasks execution a failure- Returns:
- failure
-
getBuildContext
Gets the BuildContext for the Task- Returns:
- buildContext
-
getAverageDuration
long getAverageDuration()- Returns:
- averageDuration of the
Job
-
addResultVariablesFromPreviousStages
Updates build context of the jobs in with result variables collected in previous stage(s).- Parameters:
resultVariables
-
-
setPublishedChainArtifactsInfo
void setPublishedChainArtifactsInfo(@NotNull @NotNull Multimap<String, Artifact> publishedChainArtifacts) Updates build context of the jobs with artifacts published in previous stage(s).- Parameters:
publishedChainArtifacts
-
-