Package com.atlassian.bamboo.chains
Interface ChainBuildState
@Internal
public interface ChainBuildState
Manages the State of the running
Chain-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidaddResultVariablesFromPreviousStages(Map<String, VariableDefinitionContext> resultVariables) Updates build context of the jobs in with result variables collected in previous stage(s).long@NotNull BuildContextGets the BuildContext for the Task@NotNull PlanResultKeyPlanResultKeyfor the currentChain@NotNull StageStateReturns theStageStatethat thisChainBuildStatebelongs togetState()booleanIs the Task in the Dispatched statebooleanisFailed()Was the tasks execution a failurebooleanIs the Task in the Finalized statebooleanWas the tasks execution successful or not?booleanIs the Task in the Waiting statevoidSets the State toChainBuildState.State.DISPATCHEDvoidmarkAsFinalized(BuildState buildState) Sets the State toChainBuildState.State.FINALIZEDvoidsetPublishedChainArtifactsInfo(@NotNull Multimap<String, Artifact> publishedChainArtifacts) Updates build context of the jobs with artifacts published in previous stage(s).
-
Method Details
-
getPlanResultKey
PlanResultKeyfor the currentChain- Returns:
- planResultKey
-
getStageState
Returns theStageStatethat thisChainBuildStatebelongs 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-
-