Class DeploymentExecutionServiceImpl
java.lang.Object
com.atlassian.bamboo.deployments.execution.service.DeploymentExecutionServiceImpl
- All Implemented Interfaces:
DeploymentExecutionService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionexecute
(Environment environment, @NotNull EnvironmentTriggeringAction action) Start DeploymentContext execution.boolean
isEnvironmentBeingDeployedTo
(long environmentId) Check if Environment is currently being deployed tovoid
onBuildExecuted
(OutOfBandBuildTimingPoints.SentToAgent timingPoint) void
void
void
void
onDeploymentQueued
(OutOfBandDeploymentTimingPoints.Queued timingPoint) void
onDeploymentTriggered
(@NotNull DeploymentTriggeredEvent event) void
onEnvironmentsDeleted
(@NotNull MultipleEnvironmentsDeletedEvent environmentsDeletedEvent) prepareDeploymentContext
(@NotNull Environment environment, @NotNull DeploymentVersion deploymentVersion, @NotNull TriggerReason triggerReason) Prepare DeploymentContext out of Environment and DeploymentVersionprepareDeploymentContext
(@NotNull Environment environment, @NotNull DeploymentVersion deploymentVersion, @NotNull TriggerReason triggerReason, @org.jetbrains.annotations.NotNull boolean isVerboseLoggingOn) Prepare DeploymentContext out of Environment and DeploymentVersionvoid
processDeploymentResult
(@NotNull DeploymentContext deploymentContext) Process result that has come back from the agent.void
restoreStateOfResult
(@NotNull DeploymentResult deploymentResult) Restores internal state of single deployment result after server restart.void
stop
(long environmentId) Stops the execution of a deployment running on an Environment.void
stop
(@NotNull DeploymentResult deploymentResult, Long agentId) Stops the execution of a running deploymentvoid
stopBeforeDeletion
(long environmentId) Stops the execution of a deployment running on an Environment before deleting it.void
terminateDeployment
(@NotNull DeploymentResultKey resultKey) Cleans up deployment result if execution has been terminated abrubtly.
-
Constructor Details
-
DeploymentExecutionServiceImpl
public DeploymentExecutionServiceImpl()
-
-
Method Details
-
prepareDeploymentContext
public DeploymentContext prepareDeploymentContext(@NotNull @NotNull Environment environment, @NotNull @NotNull DeploymentVersion deploymentVersion, @NotNull @NotNull TriggerReason triggerReason) throws DeploymentDoesNotSatisfyPrerequisitesException Description copied from interface:DeploymentExecutionService
Prepare DeploymentContext out of Environment and DeploymentVersion- Specified by:
prepareDeploymentContext
in interfaceDeploymentExecutionService
- Throws:
DeploymentDoesNotSatisfyPrerequisitesException
- if prerequisites needed to launch the deployment are not satisfied
-
prepareDeploymentContext
public DeploymentContext prepareDeploymentContext(@NotNull @NotNull Environment environment, @NotNull @NotNull DeploymentVersion deploymentVersion, @NotNull @NotNull TriggerReason triggerReason, @NotNull @org.jetbrains.annotations.NotNull boolean isVerboseLoggingOn) throws DeploymentDoesNotSatisfyPrerequisitesException Description copied from interface:DeploymentExecutionService
Prepare DeploymentContext out of Environment and DeploymentVersion- Specified by:
prepareDeploymentContext
in interfaceDeploymentExecutionService
- Throws:
DeploymentDoesNotSatisfyPrerequisitesException
- if prerequisites needed to launch the deployment are not satisfied
-
execute
public ExecutionRequestResult execute(Environment environment, @NotNull @NotNull EnvironmentTriggeringAction action) Description copied from interface:DeploymentExecutionService
Start DeploymentContext execution. Before putting DeploymentContext into execution pipeline this method checks if Environment is not running any other deployment.- Specified by:
execute
in interfaceDeploymentExecutionService
-
stop
public void stop(long environmentId) Description copied from interface:DeploymentExecutionService
Stops the execution of a deployment running on an Environment.- Specified by:
stop
in interfaceDeploymentExecutionService
- Parameters:
environmentId
- id of the Environment
-
stopBeforeDeletion
public void stopBeforeDeletion(long environmentId) Description copied from interface:DeploymentExecutionService
Stops the execution of a deployment running on an Environment before deleting it.- Specified by:
stopBeforeDeletion
in interfaceDeploymentExecutionService
- Parameters:
environmentId
- id of the Environment
-
stop
Description copied from interface:DeploymentExecutionService
Stops the execution of a running deployment- Specified by:
stop
in interfaceDeploymentExecutionService
- Parameters:
deploymentResult
- of the deployment we want to stopagentId
- agent on which the deployment is running
-
terminateDeployment
Description copied from interface:DeploymentExecutionService
Cleans up deployment result if execution has been terminated abrubtly.- Specified by:
terminateDeployment
in interfaceDeploymentExecutionService
-
processDeploymentResult
Description copied from interface:DeploymentExecutionService
Process result that has come back from the agent.- Specified by:
processDeploymentResult
in interfaceDeploymentExecutionService
- Parameters:
deploymentContext
- from the agent.
-
isEnvironmentBeingDeployedTo
public boolean isEnvironmentBeingDeployedTo(long environmentId) Description copied from interface:DeploymentExecutionService
Check if Environment is currently being deployed to- Specified by:
isEnvironmentBeingDeployedTo
in interfaceDeploymentExecutionService
- Parameters:
environmentId
- id of the Environment- Returns:
- true if
-
restoreStateOfResult
Description copied from interface:DeploymentExecutionService
Restores internal state of single deployment result after server restart.- Specified by:
restoreStateOfResult
in interfaceDeploymentExecutionService
- Parameters:
deploymentResult
- a restored result
-
onDeploymentFinished
@EventListener public void onDeploymentFinished(@NotNull DeploymentTimingPoints.ExecutionFinished timingPoint) -
onDeploymentTriggered
-
onDeploymentQueued
@EventListener public void onDeploymentQueued(@NotNull OutOfBandDeploymentTimingPoints.Queued timingPoint) -
onDeploymentExecuted
@EventListener public void onDeploymentExecuted(@NotNull OutOfBandDeploymentTimingPoints.SentToAgent timingPoint) -
onBuildExecuted
@EventListener public void onBuildExecuted(@NotNull OutOfBandBuildTimingPoints.SentToAgent timingPoint) -
onDeploymentExecutionStarted
@EventListener public void onDeploymentExecutionStarted(@NotNull OutOfBandDeploymentTimingPoints.ExecutionStarted timingPoint) -
onEnvironmentsDeleted
@EventListener public void onEnvironmentsDeleted(@NotNull @NotNull MultipleEnvironmentsDeletedEvent environmentsDeletedEvent)
-