Package com.atlassian.bamboo.chains
Interface ChainResultManager
-
- All Known Implementing Classes:
ChainResultManagerImpl
@Internal public interface ChainResultManagerChain specific result manager Not for use by plugin developers
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classChainResultManager.JobResultInfoForRerunInformation that has to be preserved when rerunning plans.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description @NotNull Map<PlanResultKey,ChainResultManager.JobResultInfoForRerun>cleanForRerunBuild(@NotNull BuildContext chainBuildContext)Removes all job and stage results.@NotNull ChainStateResultcreate(@NotNull BuildContext chainBuildContext, @NotNull Map<ImmutableChainStage,Map<ImmutableJob,BuildContext>> jobBuildContexts, @NotNull Collection<? extends ImmutableChainStage> stageToExecute)voidcreateRepositorySpecFailedResult(@NotNull ImmutableChain plan, @NotNull VcsRepositoryData repositoryData, @NotNull BuildChanges buildChanges, int buildNumber, @NotNull VcsLocationBambooSpecsState specsState)Create and save chain result for plan which was not updated when Repository stored specs execution was failedvoidcreateRepositorySpecSuccessResult(@NotNull ImmutableChain plan, @NotNull VcsRepositoryData repositoryData, @NotNull BuildChanges buildChanges, int buildNumber)Create and save chain result for plan which was updated when Repository stored specs executed@NotNull ChainStateResultcreateStateForRerunBuild(@NotNull BuildContext chainBuildContext, @NotNull Map<ImmutableChainStage,Map<ImmutableJob,BuildContext>> jobBuildContexts, PlanExecutionConfig planExecutionConfig, @NotNull Map<PlanResultKey,ChainResultManager.JobResultInfoForRerun> jobRestartInfo)Creates aChainStateas well stage and job results for build already executed and being rerun.longgetAverageProgressDurationForStages(@NotNull PlanIdentifier chain, @NotNull Collection<ChainStageResult> stageStates, int numberOfResults)Calculates average duration of provided stages execution@NotNull ChainStateResultupdateForContinuedBuild(@NotNull BuildContext chainBuildContext, @NotNull Collection<BuildContext> jobBuildContexts, @NotNull PlanExecutionConfig planExecutionConfig)Creates aChainStatefor build already executed and stopped on manual stage of failed@NotNull ChainStateResultupdateForRerunBuild(@NotNull BuildContext chainBuildContext, @NotNull Map<ImmutableChainStage,Map<ImmutableJob,BuildContext>> jobBuildContexts, PlanExecutionConfig planExecutionConfig)Deprecated.since 9.0 usecleanForRerunBuild(BuildContext)followed by#createStateForRerunBuild(BuildContext, Map, PlanExecutionConfig)voidupdateStateToInProgress(@NotNull PlanResultKey chainResultKey, @NotNull Date startDate)
-
-
-
Method Detail
-
create
@NotNull @NotNull ChainStateResult create(@NotNull @NotNull BuildContext chainBuildContext, @NotNull @NotNull Map<ImmutableChainStage,Map<ImmutableJob,BuildContext>> jobBuildContexts, @NotNull @NotNull Collection<? extends ImmutableChainStage> stageToExecute)
- Parameters:
chainBuildContext-jobBuildContexts-stageToExecute-- Returns:
- chainResultState
-
updateStateToInProgress
void updateStateToInProgress(@NotNull @NotNull PlanResultKey chainResultKey, @NotNull @NotNull Date startDate)- Parameters:
chainResultKey-startDate-
-
updateForContinuedBuild
@NotNull @NotNull ChainStateResult updateForContinuedBuild(@NotNull @NotNull BuildContext chainBuildContext, @NotNull @NotNull Collection<BuildContext> jobBuildContexts, @NotNull @NotNull PlanExecutionConfig planExecutionConfig) throws IOException
Creates aChainStatefor build already executed and stopped on manual stage of failed- Parameters:
chainBuildContext-jobBuildContexts-planExecutionConfig- - controls the continue/restart execution- Returns:
- Throws:
IOException
-
updateForRerunBuild
@Deprecated @NotNull @NotNull ChainStateResult updateForRerunBuild(@NotNull @NotNull BuildContext chainBuildContext, @NotNull @NotNull Map<ImmutableChainStage,Map<ImmutableJob,BuildContext>> jobBuildContexts, PlanExecutionConfig planExecutionConfig) throws IOException
Deprecated.since 9.0 usecleanForRerunBuild(BuildContext)followed by#createStateForRerunBuild(BuildContext, Map, PlanExecutionConfig)Creates aChainStatefor build already executed and being rerun. This means all succeeding manual stages that won't be executed should have their results wiped out.- Parameters:
chainBuildContext-jobBuildContexts-planExecutionConfig- - controls the continue/restart execution- Throws:
IOException
-
cleanForRerunBuild
@NotNull @NotNull Map<PlanResultKey,ChainResultManager.JobResultInfoForRerun> cleanForRerunBuild(@NotNull @NotNull BuildContext chainBuildContext)
Removes all job and stage results.- Returns:
- re
-
createStateForRerunBuild
@NotNull @NotNull ChainStateResult createStateForRerunBuild(@NotNull @NotNull BuildContext chainBuildContext, @NotNull @NotNull Map<ImmutableChainStage,Map<ImmutableJob,BuildContext>> jobBuildContexts, PlanExecutionConfig planExecutionConfig, @NotNull @NotNull Map<PlanResultKey,ChainResultManager.JobResultInfoForRerun> jobRestartInfo) throws IOException
Creates aChainStateas well stage and job results for build already executed and being rerun. Must be called aftercleanForRerunBuild(BuildContext)- Throws:
IOException
-
getAverageProgressDurationForStages
long getAverageProgressDurationForStages(@NotNull @NotNull PlanIdentifier chain, @NotNull @NotNull Collection<ChainStageResult> stageStates, int numberOfResults)Calculates average duration of provided stages execution- Parameters:
chain-stageStates- stages for current execution of plan included in calculationnumberOfResults- number of previous executions included in calculations- Returns:
-
createRepositorySpecFailedResult
void createRepositorySpecFailedResult(@NotNull @NotNull ImmutableChain plan, @NotNull @NotNull VcsRepositoryData repositoryData, @NotNull @NotNull BuildChanges buildChanges, int buildNumber, @NotNull @NotNull VcsLocationBambooSpecsState specsState)Create and save chain result for plan which was not updated when Repository stored specs execution was failed
-
createRepositorySpecSuccessResult
void createRepositorySpecSuccessResult(@NotNull @NotNull ImmutableChain plan, @NotNull @NotNull VcsRepositoryData repositoryData, @NotNull @NotNull BuildChanges buildChanges, int buildNumber)Create and save chain result for plan which was updated when Repository stored specs executed
-
-