Class DeploymentExecutionServiceImpl
java.lang.Object
com.atlassian.bamboo.deployments.execution.service.DeploymentExecutionServiceImpl
- All Implemented Interfaces:
DeploymentExecutionService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(Environment environment, @NotNull EnvironmentTriggeringAction action) Start DeploymentContext execution.booleanisEnvironmentBeingDeployedTo(long environmentId) Check if Environment is currently being deployed tovoidonBuildExecuted(OutOfBandBuildTimingPoints.SentToAgent timingPoint) voidvoidvoidvoidonDeploymentQueued(OutOfBandDeploymentTimingPoints.Queued timingPoint) voidonDeploymentTriggered(@NotNull DeploymentTriggeredEvent event) voidonEnvironmentsDeleted(@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 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.
-
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: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
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
Description copied from interface:DeploymentExecutionServiceCleans up deployment result if execution has been terminated abrubtly.- Specified by:
terminateDeploymentin interfaceDeploymentExecutionService
-
processDeploymentResult
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
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
-
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)
-