Package com.atlassian.bamboo.v2.trigger
Class PluginTriggerBuildDetectionAction
- java.lang.Object
-
- com.atlassian.bamboo.v2.trigger.PluginTriggerBuildDetectionAction
-
- All Implemented Interfaces:
BuildDetectionAction
,ConditionalBuildDetectionAction
,UserInitiatedBuildDetectionAction
public class PluginTriggerBuildDetectionAction extends Object implements UserInitiatedBuildDetectionAction, ConditionalBuildDetectionAction
-
-
Constructor Summary
Constructors Constructor Description PluginTriggerBuildDetectionAction(@NotNull PlanVcsRevisionHistoryService planVcsRevisionHistoryService, @NotNull BuildNumberGeneratorService buildNumberGenerator, @NotNull VariableDefinitionManager variableDefinitionManager, @NotNull BuildContextBuilderFactory buildContextBuilderFactory, @NotNull ImmutableChain chain, @Nullable PlanExecutionConfig planExecutionConfig, @NotNull TriggerReason triggerReason, @NotNull PlanTrigger buildTrigger, @NotNull Map<String,String> params, @NotNull Map<String,String> variables)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull BuildDetectionResult
createBuildContext()
Actual creation of aBuildContext
.PlanExecutionConfig
getPlanExecutionConfig()
Controls how plan execution would be resumed If null, normal plan execution would be performed (new build starting on first stage)io.atlassian.fugue.Pair<Boolean,ErrorCollection>
testIfBuildShouldStart(PlanExecutionLaunchControl.ReleaseLocksActions releaseLocksActions)
Method that should test if chain should be started.
-
-
-
Constructor Detail
-
PluginTriggerBuildDetectionAction
public PluginTriggerBuildDetectionAction(@NotNull @NotNull PlanVcsRevisionHistoryService planVcsRevisionHistoryService, @NotNull @NotNull BuildNumberGeneratorService buildNumberGenerator, @NotNull @NotNull VariableDefinitionManager variableDefinitionManager, @NotNull @NotNull BuildContextBuilderFactory buildContextBuilderFactory, @NotNull @NotNull ImmutableChain chain, @Nullable @Nullable PlanExecutionConfig planExecutionConfig, @NotNull @NotNull TriggerReason triggerReason, @NotNull @NotNull PlanTrigger buildTrigger, @NotNull @NotNull Map<String,String> params, @NotNull @NotNull Map<String,String> variables)
-
-
Method Detail
-
testIfBuildShouldStart
public io.atlassian.fugue.Pair<Boolean,ErrorCollection> testIfBuildShouldStart(@NotNull PlanExecutionLaunchControl.ReleaseLocksActions releaseLocksActions)
Description copied from interface:ConditionalBuildDetectionAction
Method that should test if chain should be started. It's OK for this method to take some time. Example implementation is VCS change detection. The method should not produceBuildContext
(even though BuildDetectionResult has such field) but it should perform all time consuming data gathering required to do so in subsequent call toConditionalBuildDetectionAction.createBuildContext()
- Specified by:
testIfBuildShouldStart
in interfaceConditionalBuildDetectionAction
- Parameters:
releaseLocksActions
- actions used for releasing repositories caches locks
-
createBuildContext
@NotNull public @NotNull BuildDetectionResult createBuildContext()
Description copied from interface:ConditionalBuildDetectionAction
Actual creation of aBuildContext
. Should be as fast as possible. If previous call toConditionalBuildDetectionAction.testIfBuildShouldStart(PlanExecutionLaunchControl.ReleaseLocksActions)
decided that the build should start, this method is expected to produceBuildDetectionResult
containing validBuildContext
- Specified by:
createBuildContext
in interfaceConditionalBuildDetectionAction
-
getPlanExecutionConfig
public PlanExecutionConfig getPlanExecutionConfig()
Description copied from interface:UserInitiatedBuildDetectionAction
Controls how plan execution would be resumed If null, normal plan execution would be performed (new build starting on first stage)- Specified by:
getPlanExecutionConfig
in interfaceUserInitiatedBuildDetectionAction
- Returns:
- planExecutionConfig
-
-