public class DelegatingPlanExecutionManager extends Object implements PlanExecutionManager
Constructor and Description |
---|
DelegatingPlanExecutionManager(@NotNull PlanExecutionManager target,
@NotNull com.atlassian.bamboo.plan.PlanExecutionManagerCallWatcher planExecutionManagerCallWatcher) |
Modifier and Type | Method and Description |
---|---|
@NotNull List<CurrentlyBuilding> |
getCurrentlyBuildingForPlan(PlanKey planKey)
|
@NotNull List<CurrentlyBuilding> |
getCurrentlyBuildingForPlanResult(PlanResultKey planKey)
Returns all
CurrentlyBuilding for specified PlanResultKey In case plan is a Chain
instance, all currently running jobs will be returned, however, chain itself will be not included in the list
(effectively CurrentlyBuilding for all chain's children jobs will be returned) |
@NotNull Collection<? extends ExecutionStatus> |
getExecutionStatus(@NotNull PlanKey planKey)
Returns a collection of current
ExecutionStatus s for PlanKey |
@Nullable ExecutionStatus |
getExecutionStatus(@NotNull PlanResultKey planResultKey)
Returns a
ExecutionStatus for the given PlanResultKey |
@Nullable BuildExecution |
getJobExecution(@NotNull PlanResultKey planResultKey)
Get the state of a single Job being executed
|
boolean |
isBuildingAllowed(@NotNull ImmutableChain chain)
Checks if a particular build is allowed to be built.
|
boolean |
isBusy() |
boolean |
isBusy(@NotNull PlanKey planKey)
|
int |
numberOfExecutions(@NotNull PlanKey planKey)
Returns the number of current
ExecutionStatus s available for PlanKey |
Future<Boolean> |
shutdown() |
@NotNull ExecutionRequestResult |
start(@NotNull ImmutableChain chain,
@NotNull BuildDetectionAction buildDetectionAction,
@NotNull AcquisitionPolicy acquisitionPolicy)
|
@NotNull ExecutionRequestResult |
start(@NotNull ImmutableChain chain,
@Nullable PlanExecutionConfig planExecutionConfig,
@NotNull String triggerReasonPluginKey,
@NotNull String planTriggerPluginKey,
@NotNull Map<String,String> params,
@NotNull Map<String,String> variables,
@NotNull AcquisitionPolicy acquisitionPolicy)
|
@NotNull ExecutionRequestResult |
start(@NotNull Triggerable triggerable,
@NotNull BuildDetectionAction buildDetectionAction,
@NotNull AcquisitionPolicy acquisitionPolicy)
|
@NotNull ExecutionRequestResult |
startManualExecution(@NotNull ImmutableChain chain,
PlanExecutionConfig planExecutionConfig,
@NotNull com.atlassian.user.User user,
@NotNull Map<String,String> params,
@NotNull Map<String,String> variables)
Attempts to start a manual execution of a given
Plan controlled by PlanExecutionConfig
PlanExecutionConfig allows to control manual stages execution as well as enforcing execution of manual stages |
@NotNull ExecutionRequestResult |
startManualExecution(@NotNull ImmutableChain chain,
PlanExecutionConfig planExecutionConfig,
@NotNull com.atlassian.user.User user,
@NotNull String triggerReasonPluginKey,
@NotNull String planTriggerPluginKey,
@NotNull Map<String,String> params,
@NotNull Map<String,String> variables)
Attempts to start a manual execution of a given
Plan controlled by PlanExecutionConfig
PlanExecutionConfig allows to control manual stages execution as well as enforcing execution of manual stages |
@NotNull ExecutionRequestResult |
startManualExecution(@NotNull ImmutableChain chain,
@NotNull com.atlassian.user.User user,
@NotNull Map<String,String> params,
@NotNull Map<String,String> variables)
Attempts to start a manual execution of the given
Plan |
void |
stopPlan(@NotNull PlanKey planKey,
boolean abandonResult,
String userName) |
void |
stopPlan(@NotNull PlanResultKey planResultKey,
boolean abandonResult,
String userName) |
void |
stopRequest(@NotNull PlanKey planKey)
Stops a build requests for the given
PlanKey |
public DelegatingPlanExecutionManager(@NotNull @NotNull PlanExecutionManager target, @NotNull @NotNull com.atlassian.bamboo.plan.PlanExecutionManagerCallWatcher planExecutionManagerCallWatcher)
public boolean isBusy()
isBusy
in interface PlanExecutionManager
public boolean isBusy(@NotNull @NotNull PlanKey planKey)
PlanExecutionManager
isBusy
in interface PlanExecutionManager
@NotNull public @NotNull ExecutionRequestResult start(@NotNull @NotNull ImmutableChain chain, @NotNull @NotNull BuildDetectionAction buildDetectionAction, @NotNull @NotNull AcquisitionPolicy acquisitionPolicy)
PlanExecutionManager
ImmutableChain
with the provided BuildDetectionAction
and AcquisitionPolicy
Calls to this method will acquire a lock according to the AcquisitionPolicy
on a per Plan
granularity
start
in interface PlanExecutionManager
@NotNull public @NotNull ExecutionRequestResult start(@NotNull @NotNull Triggerable triggerable, @NotNull @NotNull BuildDetectionAction buildDetectionAction, @NotNull @NotNull AcquisitionPolicy acquisitionPolicy)
PlanExecutionManager
Triggerable
with the provided BuildDetectionAction
and AcquisitionPolicy
Calls to this method will acquire a lock according to the AcquisitionPolicy
on a per Plan
granularity
start
in interface PlanExecutionManager
@NotNull public @NotNull ExecutionRequestResult start(@NotNull @NotNull ImmutableChain chain, @Nullable @Nullable PlanExecutionConfig planExecutionConfig, @NotNull @NotNull String triggerReasonPluginKey, @NotNull @NotNull String planTriggerPluginKey, @NotNull @NotNull Map<String,String> params, @NotNull @NotNull Map<String,String> variables, @NotNull @NotNull AcquisitionPolicy acquisitionPolicy)
PlanExecutionManager
start
in interface PlanExecutionManager
planExecutionConfig
- extended configuration for executiontriggerReasonPluginKey
- full plugin key for a TriggerReason
planTriggerPluginKey
- full plugin key for a PlanTrigger
params
- custom paramsvariables
- overriden variablesacquisitionPolicy
- to aquire the lock@NotNull public @NotNull ExecutionRequestResult startManualExecution(@NotNull @NotNull ImmutableChain chain, @NotNull @NotNull com.atlassian.user.User user, @NotNull @NotNull Map<String,String> params, @NotNull @NotNull Map<String,String> variables)
PlanExecutionManager
Plan
startManualExecution
in interface PlanExecutionManager
params
- - additional execution parameters set in code to parametrized build - not exposed to uservariables
- - user defined variables that could be parametrized in manual execution - contain only values
changed by user in UI@NotNull public @NotNull ExecutionRequestResult startManualExecution(@NotNull @NotNull ImmutableChain chain, PlanExecutionConfig planExecutionConfig, @NotNull @NotNull com.atlassian.user.User user, @NotNull @NotNull Map<String,String> params, @NotNull @NotNull Map<String,String> variables)
PlanExecutionManager
Plan
controlled by PlanExecutionConfig
PlanExecutionConfig
allows to control manual stages execution as well as enforcing execution of manual stagesstartManualExecution
in interface PlanExecutionManager
@NotNull public @NotNull ExecutionRequestResult startManualExecution(@NotNull @NotNull ImmutableChain chain, PlanExecutionConfig planExecutionConfig, @NotNull @NotNull com.atlassian.user.User user, @NotNull @NotNull String triggerReasonPluginKey, @NotNull @NotNull String planTriggerPluginKey, @NotNull @NotNull Map<String,String> params, @NotNull @NotNull Map<String,String> variables)
PlanExecutionManager
Plan
controlled by PlanExecutionConfig
PlanExecutionConfig
allows to control manual stages execution as well as enforcing execution of manual stagesstartManualExecution
in interface PlanExecutionManager
public boolean isBuildingAllowed(@NotNull @NotNull ImmutableChain chain)
PlanExecutionManager
isBuildingAllowed
in interface PlanExecutionManager
@NotNull public @NotNull List<CurrentlyBuilding> getCurrentlyBuildingForPlan(PlanKey planKey)
PlanExecutionManager
PlanKey
In case plan is a Chain
instance, all
currently running jobs will be returnedgetCurrentlyBuildingForPlan
in interface PlanExecutionManager
@NotNull public @NotNull List<CurrentlyBuilding> getCurrentlyBuildingForPlanResult(PlanResultKey planKey)
PlanExecutionManager
CurrentlyBuilding
for specified PlanResultKey
In case plan is a Chain
instance, all currently running jobs will be returned, however, chain itself will be not included in the list
(effectively CurrentlyBuilding
for all chain's children jobs will be returned)getCurrentlyBuildingForPlanResult
in interface PlanExecutionManager
public void stopPlan(@NotNull @NotNull PlanResultKey planResultKey, boolean abandonResult, String userName)
stopPlan
in interface PlanExecutionManager
public void stopPlan(@NotNull @NotNull PlanKey planKey, boolean abandonResult, String userName) throws InterruptedException
stopPlan
in interface PlanExecutionManager
InterruptedException
public void stopRequest(@NotNull @NotNull PlanKey planKey)
PlanExecutionManager
PlanKey
stopRequest
in interface PlanExecutionManager
public int numberOfExecutions(@NotNull @NotNull PlanKey planKey)
ExecutionStatusProvider
ExecutionStatus
s available for PlanKey
numberOfExecutions
in interface ExecutionStatusProvider
@NotNull public @NotNull Collection<? extends ExecutionStatus> getExecutionStatus(@NotNull @NotNull PlanKey planKey)
ExecutionStatusProvider
ExecutionStatus
s for PlanKey
getExecutionStatus
in interface ExecutionStatusProvider
@Nullable public @Nullable ExecutionStatus getExecutionStatus(@NotNull @NotNull PlanResultKey planResultKey)
ExecutionStatusProvider
ExecutionStatus
for the given PlanResultKey
getExecutionStatus
in interface ExecutionStatusProvider
@Nullable public @Nullable BuildExecution getJobExecution(@NotNull @NotNull PlanResultKey planResultKey)
ExecutionStatusProvider
getJobExecution
in interface ExecutionStatusProvider
public Future<Boolean> shutdown()
shutdown
in interface PlanExecutionManager
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.