@Internal
public interface ChainResultManager
Modifier and Type | Interface and Description |
---|---|
static class |
ChainResultManager.JobResultInfoForRerun
Information that has to be preserved when rerunning plans.
|
Modifier and Type | Method and Description |
---|---|
@NotNull Map<PlanResultKey,ChainResultManager.JobResultInfoForRerun> |
cleanForRerunBuild(@NotNull BuildContext chainBuildContext)
Removes all job and stage results.
|
@NotNull ChainStateResult |
create(@NotNull BuildContext chainBuildContext,
@NotNull Map<ImmutableChainStage,Map<ImmutableJob,BuildContext>> jobBuildContexts,
@NotNull Collection<? extends ImmutableChainStage> stageToExecute)
|
void |
createRepositorySpecFailedResult(@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 failed
|
void |
createRepositorySpecSuccessResult(@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 ChainStateResult |
createStateForRerunBuild(@NotNull BuildContext chainBuildContext,
@NotNull Map<ImmutableChainStage,Map<ImmutableJob,BuildContext>> jobBuildContexts,
PlanExecutionConfig planExecutionConfig,
@NotNull Map<PlanResultKey,ChainResultManager.JobResultInfoForRerun> jobRestartInfo)
Creates a
ChainState as well stage and job results for build already executed and being rerun. |
long |
getAverageProgressDurationForStages(@NotNull PlanIdentifier chain,
@NotNull Collection<ChainStageResult> stageStates,
int numberOfResults)
Calculates average duration of provided stages execution
|
@NotNull ChainStateResult |
updateForContinuedBuild(@NotNull BuildContext chainBuildContext,
@NotNull Collection<BuildContext> jobBuildContexts,
@NotNull PlanExecutionConfig planExecutionConfig)
Creates a
ChainState for build already executed and stopped on manual stage of failed |
@NotNull ChainStateResult |
updateForRerunBuild(@NotNull BuildContext chainBuildContext,
@NotNull Map<ImmutableChainStage,Map<ImmutableJob,BuildContext>> jobBuildContexts,
PlanExecutionConfig planExecutionConfig)
Deprecated.
since 9.0 use
cleanForRerunBuild(BuildContext) followed by #createStateForRerunBuild(BuildContext, Map, PlanExecutionConfig) |
void |
updateStateToInProgress(@NotNull PlanResultKey chainResultKey,
@NotNull Date startDate) |
@NotNull @NotNull ChainStateResult create(@NotNull @NotNull BuildContext chainBuildContext, @NotNull @NotNull Map<ImmutableChainStage,Map<ImmutableJob,BuildContext>> jobBuildContexts, @NotNull @NotNull Collection<? extends ImmutableChainStage> stageToExecute)
chainBuildContext
- jobBuildContexts
- stageToExecute
- void updateStateToInProgress(@NotNull @NotNull PlanResultKey chainResultKey, @NotNull @NotNull Date startDate)
chainResultKey
- startDate
- @NotNull @NotNull ChainStateResult updateForContinuedBuild(@NotNull @NotNull BuildContext chainBuildContext, @NotNull @NotNull Collection<BuildContext> jobBuildContexts, @NotNull @NotNull PlanExecutionConfig planExecutionConfig) throws IOException
ChainState
for build already executed and stopped on manual stage of failedchainBuildContext
- jobBuildContexts
- planExecutionConfig
- - controls the continue/restart executionIOException
@Deprecated @NotNull @NotNull ChainStateResult updateForRerunBuild(@NotNull @NotNull BuildContext chainBuildContext, @NotNull @NotNull Map<ImmutableChainStage,Map<ImmutableJob,BuildContext>> jobBuildContexts, PlanExecutionConfig planExecutionConfig) throws IOException
cleanForRerunBuild(BuildContext)
followed by #createStateForRerunBuild(BuildContext, Map, PlanExecutionConfig)
ChainState
for build already executed and being rerun.
This means all succeeding manual stages that won't be executed should have their results wiped out.chainBuildContext
- jobBuildContexts
- planExecutionConfig
- - controls the continue/restart executionIOException
@NotNull @NotNull Map<PlanResultKey,ChainResultManager.JobResultInfoForRerun> cleanForRerunBuild(@NotNull @NotNull BuildContext chainBuildContext)
@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
ChainState
as well stage and job results for build already executed and being rerun.
Must be called after cleanForRerunBuild(BuildContext)
IOException
long getAverageProgressDurationForStages(@NotNull @NotNull PlanIdentifier chain, @NotNull @NotNull Collection<ChainStageResult> stageStates, int numberOfResults)
chain
- stageStates
- stages for current execution of plan included in calculationnumberOfResults
- number of previous executions included in calculationsvoid createRepositorySpecFailedResult(@NotNull @NotNull ImmutableChain plan, @NotNull @NotNull VcsRepositoryData repositoryData, @NotNull @NotNull BuildChanges buildChanges, int buildNumber, @NotNull @NotNull VcsLocationBambooSpecsState specsState)
void createRepositorySpecSuccessResult(@NotNull @NotNull ImmutableChain plan, @NotNull @NotNull VcsRepositoryData repositoryData, @NotNull @NotNull BuildChanges buildChanges, int buildNumber)
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.