/** * @return bool|null */ public function start() { parent::start(); switch ($this->Status) { case 'Started': // If we are doing a subtask, check which one to continue switch ($this->Doing) { case 'Deployment': return $this->continueRevertDeploy(); case 'Snapshot': return $this->continueRevertDatabase(); default: $this->log("Unable to process {$this->Title} with subtask of {$this->Doing}"); $this->markFailed(); return false; } case 'Queued': // Begin rollback by initiating deployment return $this->startRevertDeploy(); default: $this->log("Unable to process {$this->Title} with status of {$this->Status}"); $this->markFailed(); return false; } }
public function allowedActions() { // Don't show options if this step has already been confirmed or can't be confirmed if ($this->hasResponse() || !$this->isRunning() || !$this->canApprove()) { return parent::allowedActions(); } // Return actions return array('approve' => array('ButtonText' => 'Approve', 'ButtonType' => 'btn-success', 'Link' => $this->Pipeline()->StepLink('approve'), 'Title' => 'Approves the current deployment, allowing it to continue'), 'reject' => array('ButtonText' => 'Reject', 'ButtonType' => 'btn-danger', 'Link' => $this->Pipeline()->StepLink('reject'), 'Title' => 'Deny the request to release this deployment')); }
public function allowedActions() { // Don't show options if this step has already been confirmed or can't be confirmed if (!$this->canTriggerDeploy()) { return parent::allowedActions(); } // Return actions return array('deploy' => array('ButtonText' => 'Deploy', 'ButtonType' => 'btn-success', 'Link' => $this->Pipeline()->StepLink('deploy'), 'Title' => 'Trigger the current deployment, allowing it to continue')); }
public function allowedActions() { // Don't show options if this step has already been confirmed or can't be confirmed if (!$this->canTriggerRollback()) { return parent::allowedActions(); } // Return actions return array('rollback' => array('ButtonText' => _t('EmergencyRollbackStep.ROLLBACKBUTTON', 'Rollback'), 'ButtonType' => 'btn-success', 'Link' => $this->Pipeline()->StepLink('rollback'), 'Title' => _t('EmergencyRollbackStep.ROLLBACKTHEDEPLOYMENTTITLE', 'Rollback the deployment')), 'dismiss' => array('ButtonText' => _t('EmergencyRollbackStep.DISMISS', 'Dismiss'), 'ButtonType' => 'btn-info', 'Link' => $this->Pipeline()->StepLink('dismiss'), 'Title' => _t('EmergencyRollbackStep.ROLLBACKTHEDEPLOYMENTTITLE', 'Dismiss this option'))); }