Class DeploymentExecutionServiceImpl
- java.lang.Object
-
- com.atlassian.bamboo.deployments.execution.service.DeploymentExecutionServiceImpl
-
- All Implemented Interfaces:
DeploymentExecutionService
public class DeploymentExecutionServiceImpl extends Object implements DeploymentExecutionService
-
-
Constructor Summary
Constructors Constructor Description DeploymentExecutionServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExecutionRequestResultexecute(Environment environment, @NotNull EnvironmentTriggeringAction action)Start DeploymentContext execution.booleanisEnvironmentBeingDeployedTo(long environmentId)Check if Environment is currently being deployed tovoidonBuildExecuted(OutOfBandBuildTimingPoints.SentToAgent timingPoint)voidonDeploymentExecuted(OutOfBandDeploymentTimingPoints.SentToAgent timingPoint)voidonDeploymentExecutionStarted(OutOfBandDeploymentTimingPoints.ExecutionStarted timingPoint)voidonDeploymentFinished(DeploymentTimingPoints.ExecutionFinished timingPoint)voidonDeploymentQueued(OutOfBandDeploymentTimingPoints.Queued timingPoint)voidonDeploymentTriggered(@NotNull DeploymentTriggeredEvent event)voidonEnvironmentsDeleted(@NotNull MultipleEnvironmentsDeletedEvent environmentsDeletedEvent)DeploymentContextprepareDeploymentContext(@NotNull Environment environment, @NotNull DeploymentVersion deploymentVersion, @NotNull TriggerReason triggerReason)Prepare DeploymentContext out of Environment and DeploymentVersionDeploymentContextprepareDeploymentContext(@NotNull Environment environment, @NotNull DeploymentVersion deploymentVersion, @NotNull TriggerReason triggerReason, @org.jetbrains.annotations.NotNull boolean isVerboseLoggingOn)Prepare DeploymentContext out of Environment and DeploymentVersionvoidprocessDeploymentResult(@NotNull DeploymentContext deploymentContext)Process result that has come back from the agent.voidrestoreStateOfResult(@NotNull DeploymentResult deploymentResult)Restores internal state of single deployment result after server restart.voidstop(long environmentId)Stops the execution of a deployment running on an Environment.voidstop(@NotNull DeploymentResult deploymentResult, Long agentId)Stops the execution of a running deploymentvoidstopBeforeDeletion(long environmentId)Stops the execution of a deployment running on an Environment before deleting it.voidterminateDeployment(@NotNull DeploymentResultKey resultKey)Cleans up deployment result if execution has been terminated abrubtly.
-
-
-
Method Detail
-
prepareDeploymentContext
public DeploymentContext prepareDeploymentContext(@NotNull @NotNull Environment environment, @NotNull @NotNull DeploymentVersion deploymentVersion, @NotNull @NotNull TriggerReason triggerReason) throws DeploymentDoesNotSatisfyPrerequisitesException
Description copied from interface:DeploymentExecutionServicePrepare DeploymentContext out of Environment and DeploymentVersion- Specified by:
prepareDeploymentContextin 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:DeploymentExecutionServicePrepare DeploymentContext out of Environment and DeploymentVersion- Specified by:
prepareDeploymentContextin 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:DeploymentExecutionServiceStart DeploymentContext execution. Before putting DeploymentContext into execution pipeline this method checks if Environment is not running any other deployment.- Specified by:
executein interfaceDeploymentExecutionService
-
stop
public void stop(long environmentId)
Description copied from interface:DeploymentExecutionServiceStops the execution of a deployment running on an Environment.- Specified by:
stopin interfaceDeploymentExecutionService- Parameters:
environmentId- id of the Environment
-
stopBeforeDeletion
public void stopBeforeDeletion(long environmentId)
Description copied from interface:DeploymentExecutionServiceStops the execution of a deployment running on an Environment before deleting it.- Specified by:
stopBeforeDeletionin interfaceDeploymentExecutionService- Parameters:
environmentId- id of the Environment
-
stop
public void stop(@NotNull @NotNull DeploymentResult deploymentResult, Long agentId)Description copied from interface:DeploymentExecutionServiceStops the execution of a running deployment- Specified by:
stopin interfaceDeploymentExecutionService- Parameters:
deploymentResult- of the deployment we want to stopagentId- agent on which the deployment is running
-
terminateDeployment
public void terminateDeployment(@NotNull @NotNull DeploymentResultKey resultKey)Description copied from interface:DeploymentExecutionServiceCleans up deployment result if execution has been terminated abrubtly.- Specified by:
terminateDeploymentin interfaceDeploymentExecutionService
-
processDeploymentResult
public void processDeploymentResult(@NotNull @NotNull DeploymentContext deploymentContext)Description copied from interface:DeploymentExecutionServiceProcess result that has come back from the agent.- Specified by:
processDeploymentResultin interfaceDeploymentExecutionService- Parameters:
deploymentContext- from the agent.
-
isEnvironmentBeingDeployedTo
public boolean isEnvironmentBeingDeployedTo(long environmentId)
Description copied from interface:DeploymentExecutionServiceCheck if Environment is currently being deployed to- Specified by:
isEnvironmentBeingDeployedToin interfaceDeploymentExecutionService- Parameters:
environmentId- id of the Environment- Returns:
- true if
-
restoreStateOfResult
public void restoreStateOfResult(@NotNull @NotNull DeploymentResult deploymentResult)Description copied from interface:DeploymentExecutionServiceRestores internal state of single deployment result after server restart.- Specified by:
restoreStateOfResultin interfaceDeploymentExecutionService- Parameters:
deploymentResult- a restored result
-
onDeploymentFinished
@EventListener public void onDeploymentFinished(@NotNull DeploymentTimingPoints.ExecutionFinished timingPoint)
-
onDeploymentTriggered
@EventListener public void onDeploymentTriggered(@NotNull @NotNull DeploymentTriggeredEvent event)
-
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)
-
-