\RollbackStep
Peforms rollback of a pipeline to a previous status.
Note that this step would usually only be used in the special conditional rollback situation configured
on the Pipeline itself - see the Pipeline documentation for details.
<code>
RollbackStep1:
Class: RollbackStep
RestoreDB: true
MaxDuration: 3600
</code>
Synopsis
class RollbackStep
extends LongRunningPipelineStep
{
- // Inherited members from PipelineStep
- protected $mergedConfig;
- // methods
- public void getTitle()
- public void start()
- protected boolean startRevertDeploy()
- protected bool startRevertDatabase()
- protected void continueRevertDatabase()
- protected boolean continueRevertDeploy()
- protected boolean doRestoreDB()
- protected boolean checkResqueStatus()
- // Inherited methods from LongRunningPipelineStep
- public int getMaxDuration()
- public boolean isTimedOut()
- public int getAge()
- public void start()
- // Inherited methods from PipelineStep
- public string getTitle()
- public void getTreeTitle()
- public void getNiceName()
- public array getConfigData()
- public void setConfig()
- public string getRunningDescription()
- public mixed getConfigSetting()
- public void finish()
- public void markFailed()
- public boolean isQueued()
- public boolean isRunning()
- public boolean isFinished()
- public boolean isFailed()
- public boolean isAborted()
- public void log()
- protected DNEnvironment getDependentEnvironment()
- public boolean start()
- public boolean abort()
- public array allowedActions()
- public void getDryRun()
Hierarchy
Extends
Members
private
- $db
- $has_one
protected
- $mergedConfig
—
array
Cached of config merged with defaults
Methods
protected
- checkResqueStatus() — Check the status of a resque sub-task
- continueRevertDatabase() — Check status of current snapshot
- continueRevertDeploy() — Check status of deployment and finish task if complete, or fail if timedout
- doRestoreDB() — Check if we are intending to restore the DB after this deployment
- startRevertDatabase() — Create a snapshot of the db and store the ID on the Pipline
- startRevertDeploy() — Begin a new deployment
public
Inherited from LongRunningPipelineStep
public
- getAge() — Gets the age of this job in seconds, or 0 if not started
- getMaxDuration() — Determines maximum allowed execution for deployment
- isTimedOut() — Return true if this has timed out
- start()
Inherited from PipelineStep
protected
- getDependentEnvironment() — Tries to look up the value of the 'PerformTestOn' yml key for this step, and return the {@link DNEnvironment} that the key refers to, if set.
public
- abort() — Abort the step immediately, regardless of its current state, performing any cleanup necessary.
- allowedActions() — List of allowed actions the user is all allowed to take on this step
- finish()
- getConfigData() — Unserializes a snippet of configuration that was saved at the time this step was created at {@link Pipeline::start()} so that this step can use that configuration to determine what it needs to do. e.g for SmokeTestPipelineStep this might contain a list of URLs that need to be checked and which status codes to check for.
- getConfigSetting() — Retrieve the value of a specific config setting
- getDryRun()
- getNiceName()
- getRunningDescription() — Describe what the step is currently doing.
- getTitle() — Title of this step
- getTreeTitle()
- isAborted() — Determine if the step has been aborted (Aborted state).
- isFailed() — Determine if the step has failed on its own (Failed state). No further state transitions may occur.
- isFinished() — Determine if this step is in progress (Started state).
- isQueued() — Determine if this step is in progress (Started state).
- isRunning() — Determine if this step is in progress (Started state).
- log() — Log a message to the current log
- markFailed() — Fail this pipeline step
- setConfig()
- start() — Initialise the step unless it's already running (Started state).