@PublicApi public interface PlanExecutionManager extends ExecutionStatusProvider
Plan
'sModifier and Type | Method and Description |
---|---|
List<CurrentlyBuilding> |
getCurrentlyBuildingForPlan(PlanKey planKey)
|
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) |
boolean |
isBuildingAllowed(ImmutableChain chain)
Checks if a particular build is allowed to be built.
|
boolean |
isBusy() |
boolean |
isBusy(PlanKey planKey)
|
Future<Boolean> |
shutdown() |
ExecutionRequestResult |
start(ImmutableChain chain,
BuildDetectionAction buildDetectionAction,
AcquisitionPolicy acquisitionPolicy)
|
ExecutionRequestResult |
start(ImmutableChain chain,
PlanExecutionConfig planExecutionConfig,
String triggerReasonPluginKey,
String planTriggerPluginKey,
Map<String,String> params,
Map<String,String> variables,
AcquisitionPolicy acquisitionPolicy)
|
ExecutionRequestResult |
start(Triggerable triggerable,
BuildDetectionAction buildDetectionAction,
AcquisitionPolicy acquisitionPolicy)
|
ExecutionRequestResult |
startManualExecution(ImmutableChain chain,
PlanExecutionConfig planExecutionConfig,
com.atlassian.user.User user,
Map<String,String> params,
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 |
ExecutionRequestResult |
startManualExecution(ImmutableChain chain,
PlanExecutionConfig planExecutionConfig,
com.atlassian.user.User user,
String triggerReasonPluginKey,
String planTriggerPluginKey,
Map<String,String> params,
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 |
ExecutionRequestResult |
startManualExecution(ImmutableChain chain,
com.atlassian.user.User user,
Map<String,String> params,
Map<String,String> variables)
Attempts to start a manual execution of the given
Plan |
void |
stopPlan(PlanKey planKey,
boolean abandonResult,
String userName) |
void |
stopPlan(PlanResultKey planResultKey,
boolean abandonResult,
String userName) |
void |
stopRequest(PlanKey planKey)
Stops a build requests for the given
PlanKey |
getExecutionStatus, getExecutionStatus, getJobExecution, numberOfExecutions
boolean isBusy()
boolean isBusy(@NotNull PlanKey planKey)
planKey
- @NotNull ExecutionRequestResult start(@NotNull ImmutableChain chain, @NotNull BuildDetectionAction buildDetectionAction, @NotNull AcquisitionPolicy acquisitionPolicy)
ImmutableChain
with the provided BuildDetectionAction
and AcquisitionPolicy
Calls to this method will acquire a lock according to the AcquisitionPolicy
on a per Plan
granularity
chain
- buildDetectionAction
- acquisitionPolicy
- IncorrectPlanTypeException
- if the Plan
could not be processed@NotNull ExecutionRequestResult start(@NotNull Triggerable triggerable, @NotNull BuildDetectionAction buildDetectionAction, @NotNull AcquisitionPolicy acquisitionPolicy)
Triggerable
with the provided BuildDetectionAction
and AcquisitionPolicy
Calls to this method will acquire a lock according to the AcquisitionPolicy
on a per Plan
granularity
triggerable
- buildDetectionAction
- acquisitionPolicy
- IncorrectPlanTypeException
- if the Plan
could not be processed@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)
chain
- 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 lockIncorrectPlanTypeException
- if the Plan
could not be processed@NotNull ExecutionRequestResult startManualExecution(@NotNull ImmutableChain chain, @NotNull com.atlassian.user.User user, @NotNull Map<String,String> params, @NotNull Map<String,String> variables)
Plan
chain
- user
- 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 ExecutionRequestResult startManualExecution(@NotNull ImmutableChain chain, PlanExecutionConfig planExecutionConfig, @NotNull com.atlassian.user.User user, @NotNull Map<String,String> params, @NotNull Map<String,String> variables)
Plan
controlled by PlanExecutionConfig
PlanExecutionConfig
allows to control manual stages execution as well as enforcing execution of manual stageschain
- planExecutionConfig
- user
- params
- variables
- @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)
Plan
controlled by PlanExecutionConfig
PlanExecutionConfig
allows to control manual stages execution as well as enforcing execution of manual stageschain
- planExecutionConfig
- user
- triggerReasonPluginKey
- planTriggerPluginKey
- params
- variables
- boolean isBuildingAllowed(@NotNull ImmutableChain chain)
chain
- @NotNull List<CurrentlyBuilding> getCurrentlyBuildingForPlan(PlanKey planKey)
PlanKey
In case plan is a Chain
instance, all
currently running jobs will be returnedplanKey
- @NotNull List<CurrentlyBuilding> getCurrentlyBuildingForPlanResult(PlanResultKey planKey)
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)planKey
- void stopPlan(@NotNull PlanResultKey planResultKey, boolean abandonResult, String userName)
void stopPlan(@NotNull PlanKey planKey, boolean abandonResult, String userName) throws InterruptedException
InterruptedException
void stopRequest(@NotNull PlanKey planKey)
PlanKey
planKey
- Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.