Package com.atlassian.bamboo.chains
Interface BuildContextFactory
- All Known Implementing Classes:
BuildContextFactoryImpl
@Internal
public interface BuildContextFactory
-
Method Summary
Modifier and TypeMethodDescription@NotNull BuildRepositoryChangesbuildChangesUnion(@NotNull BuildRepositoryChanges a, @NotNull BuildRepositoryChanges b) booleancanRestartOrContinueBuild(@NotNull ImmutableChain chain, @NotNull ChainResultsSummary chainResultsSummary, @NotNull PlanExecutionConfig planExecutionConfig) Checks if build can be continued from a manual stage or restarted, that is, if there are any stages to be run and if all the jobs in those stages still exist.@NotNull Map<ImmutableChainStage,Map<ImmutableJob, BuildContext>> createBuildContextsForJobs(@NotNull ImmutableChain chain, @NotNull BuildContext parentBuildContext) @NotNull Map<ImmutableChainStage,Map<ImmutableJob, BuildContext>> createBuildContextsForJobs(@NotNull ImmutableChain chain, @Nullable ChainResultsSummary chainResultsSummary, @NotNull BuildContext parentBuildContext, @NotNull PlanExecutionConfig planExecutionConfig) @NotNull Collection<BuildContext>createBuildContextsForRestartedOrContinuedBuild(@NotNull ImmutableChain chain, @NotNull ChainResultsSummary chainResultsSummary, @NotNull BuildContext parentBuildContext, @NotNull PlanExecutionConfig planExecutionConfig) Creates aBuildContextfor each not built or failedJobin theChainthat was partially executed or is restarted for example with "continue manual stage" action, or "re-run failed jobs" action, etcvoidupdateBuildContextWithChanges(BuildContext contextToUpdate, BuildChanges newBuildChanges) Updates the build context with build changes
-
Method Details
-
createBuildContextsForJobs
@NotNull @NotNull Map<ImmutableChainStage,Map<ImmutableJob, createBuildContextsForJobsBuildContext>> (@NotNull @NotNull ImmutableChain chain, @NotNull @NotNull BuildContext parentBuildContext) - Parameters:
chain-parentBuildContext- - buildContext of the parent chain execution- Returns:
- map of
JobPlanKeys to theirBuildContext
-
canRestartOrContinueBuild
boolean canRestartOrContinueBuild(@NotNull @NotNull ImmutableChain chain, @NotNull @NotNull ChainResultsSummary chainResultsSummary, @NotNull @NotNull PlanExecutionConfig planExecutionConfig) Checks if build can be continued from a manual stage or restarted, that is, if there are any stages to be run and if all the jobs in those stages still exist. -
createBuildContextsForRestartedOrContinuedBuild
@NotNull @NotNull Collection<BuildContext> createBuildContextsForRestartedOrContinuedBuild(@NotNull @NotNull ImmutableChain chain, @NotNull @NotNull ChainResultsSummary chainResultsSummary, @NotNull @NotNull BuildContext parentBuildContext, @NotNull @NotNull PlanExecutionConfig planExecutionConfig) Creates aBuildContextfor each not built or failedJobin theChainthat was partially executed or is restarted for example with "continue manual stage" action, or "re-run failed jobs" action, etc- Parameters:
chainResultsSummary- - existingChainResultsSummaryfor build to continue/restartparentBuildContext- -ChainBuildContextplanExecutionConfig- - controls build continuation or restart- Returns:
- collection of
BuildContextto execute
-
createBuildContextsForJobs
@NotNull @NotNull Map<ImmutableChainStage,Map<ImmutableJob, createBuildContextsForJobsBuildContext>> (@NotNull @NotNull ImmutableChain chain, @Nullable @Nullable ChainResultsSummary chainResultsSummary, @NotNull @NotNull BuildContext parentBuildContext, @NotNull @NotNull PlanExecutionConfig planExecutionConfig) - Since:
- 6.9
-
buildChangesUnion
@NotNull @NotNull BuildRepositoryChanges buildChangesUnion(@NotNull @NotNull BuildRepositoryChanges a, @NotNull @NotNull BuildRepositoryChanges b) -
updateBuildContextWithChanges
Updates the build context with build changes- Parameters:
contextToUpdate-newBuildChanges-
-