Package com.atlassian.bamboo.chains
Interface BuildContextFactory
-
- All Known Implementing Classes:
BuildContextFactoryImpl
@Internal public interface BuildContextFactory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description @NotNull BuildRepositoryChanges
buildChangesUnion(@NotNull BuildRepositoryChanges a, @NotNull BuildRepositoryChanges b)
boolean
canRestartOrContinueBuild(@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 BuildRepositoryChanges
cloneBuildRepositoryChanges(@NotNull BuildRepositoryChanges buildRepositoryChanges)
Deprecated.since 5.0 use com.atlassian.bamboo.v2.build.BuildRepositoryChangesImpl constructor instead@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 aBuildContext
for each not built or failedJob
in theChain
that was partially executed or is restarted for example with "continue manual stage" action, or "re-run failed jobs" action, etcvoid
updateBuildContextWithChanges(BuildContext contextToUpdate, BuildChanges newBuildChanges)
Updates the build context with build changes
-
-
-
Method Detail
-
createBuildContextsForJobs
@NotNull @NotNull Map<ImmutableChainStage,Map<ImmutableJob,BuildContext>> createBuildContextsForJobs(@NotNull @NotNull ImmutableChain chain, @NotNull @NotNull BuildContext parentBuildContext)
- Parameters:
chain
-parentBuildContext
- - buildContext of the parent chain execution- Returns:
- map of
Job
PlanKey
s 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 aBuildContext
for each not built or failedJob
in theChain
that was partially executed or is restarted for example with "continue manual stage" action, or "re-run failed jobs" action, etc- Parameters:
chainResultsSummary
- - existingChainResultsSummary
for build to continue/restartparentBuildContext
- -Chain
BuildContext
planExecutionConfig
- - controls build continuation or restart- Returns:
- collection of
BuildContext
to execute
-
createBuildContextsForJobs
@NotNull @NotNull Map<ImmutableChainStage,Map<ImmutableJob,BuildContext>> createBuildContextsForJobs(@NotNull @NotNull ImmutableChain chain, @Nullable @Nullable ChainResultsSummary chainResultsSummary, @NotNull @NotNull BuildContext parentBuildContext, @NotNull @NotNull PlanExecutionConfig planExecutionConfig)
- Since:
- 6.9
-
cloneBuildRepositoryChanges
@NotNull @Deprecated @NotNull BuildRepositoryChanges cloneBuildRepositoryChanges(@NotNull @NotNull BuildRepositoryChanges buildRepositoryChanges)
Deprecated.since 5.0 use com.atlassian.bamboo.v2.build.BuildRepositoryChangesImpl constructor insteadThis is not a real clone() operation- Parameters:
buildRepositoryChanges
-- Returns:
- cloned
BuildRepositoryChanges
-
buildChangesUnion
@NotNull @NotNull BuildRepositoryChanges buildChangesUnion(@NotNull @NotNull BuildRepositoryChanges a, @NotNull @NotNull BuildRepositoryChanges b)
-
updateBuildContextWithChanges
void updateBuildContextWithChanges(BuildContext contextToUpdate, BuildChanges newBuildChanges)
Updates the build context with build changes- Parameters:
contextToUpdate
-newBuildChanges
-
-
-