Package com.atlassian.bamboo.build
Interface ConditionalBuildDetectionAction
- All Superinterfaces:
BuildDetectionAction
- All Known Implementing Classes:
ChangeDetectionListenerAction
,PluginTriggerBuildDetectionAction
Optional
BuildDetectionAction
interface that indicates that the action makes a decision if the build
should start.-
Method Summary
Modifier and TypeMethodDescriptionActual creation of aBuildContext
.io.atlassian.fugue.Pair<Boolean,
ErrorCollection> testIfBuildShouldStart
(PlanExecutionLaunchControl.ReleaseLocksActions releaseLocksActions) Method that should test if chain should be started.
-
Method Details
-
testIfBuildShouldStart
io.atlassian.fugue.Pair<Boolean,ErrorCollection> testIfBuildShouldStart(@NotNull PlanExecutionLaunchControl.ReleaseLocksActions releaseLocksActions) 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 tocreateBuildContext()
- Parameters:
releaseLocksActions
- actions used for releasing repositories caches locks
-
createBuildContext
BuildDetectionResult createBuildContext()Actual creation of aBuildContext
. Should be as fast as possible. If previous call totestIfBuildShouldStart(PlanExecutionLaunchControl.ReleaseLocksActions)
decided that the build should start, this method is expected to produceBuildDetectionResult
containing validBuildContext
-