/** * Create a deployment strategy. * * @param DNEnvironment $environment * @param array $options * * @return DeploymentStrategy */ public function planDeploy(DNEnvironment $environment, $options) { $strategy = new DeploymentStrategy($environment, $options); $currentBuild = $environment->CurrentBuild(); $currentSha = $currentBuild ? $currentBuild->SHA : '-'; if ($currentSha !== $options['sha']) { $strategy->setChange('Code version', $currentSha, $options['sha']); } $strategy->setActionTitle('Confirm deployment'); $strategy->setActionCode('fast'); $strategy->setEstimatedTime('2'); return $strategy; }