@@ -19,27 +19,27 @@ |
||
| 19 | 19 | * |
| 20 | 20 | */ |
| 21 | 21 | public function perform() { |
| 22 | - echo "[-] CreateEnvJob starting" . PHP_EOL; |
|
| 22 | + echo "[-] CreateEnvJob starting".PHP_EOL; |
|
| 23 | 23 | |
| 24 | 24 | $log = new DeploynautLogFile($this->args['logfile']); |
| 25 | 25 | $envCreate = DNCreateEnvironment::get()->byId($this->args['createID']); |
| 26 | 26 | |
| 27 | 27 | // This is a bit icky, but there is no easy way of capturing a failed deploy by using the PHP Resque |
| 28 | 28 | try { |
| 29 | - if(!($envCreate && $envCreate->exists())) { |
|
| 29 | + if (!($envCreate && $envCreate->exists())) { |
|
| 30 | 30 | throw new RuntimeException(sprintf('Could not find create environment record %s', $args['createID'])); |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | // This will throw and exception if it fails. |
| 34 | 34 | $envCreate->createEnvironment(); |
| 35 | 35 | |
| 36 | - } catch(Exception $e) { |
|
| 36 | + } catch (Exception $e) { |
|
| 37 | 37 | $log->write($e->getMessage()); |
| 38 | - echo "[-] CreateEnvJob failed" . PHP_EOL; |
|
| 38 | + echo "[-] CreateEnvJob failed".PHP_EOL; |
|
| 39 | 39 | throw $e; |
| 40 | 40 | } |
| 41 | 41 | $this->updateStatus('Finished'); |
| 42 | - echo "[-] CreateEnvJob finished" . PHP_EOL; |
|
| 42 | + echo "[-] CreateEnvJob finished".PHP_EOL; |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -70,12 +70,12 @@ |
||
| 70 | 70 | public function getModel($name = '') { |
| 71 | 71 | $base = Director::absoluteBaseURL(); |
| 72 | 72 | return [ |
| 73 | - 'basename' => Director::baseURL() . $this->getCurrentEnvironment()->Link('overview'), |
|
| 73 | + 'basename' => Director::baseURL().$this->getCurrentEnvironment()->Link('overview'), |
|
| 74 | 74 | 'dispatchers' => [ |
| 75 | - 'git' => $base . $this->getCurrentProject()->Link('git'), |
|
| 76 | - 'plan' => $base . $this->getCurrentEnvironment()->Link('plan'), |
|
| 77 | - 'deploys' => $base . $this->getCurrentEnvironment()->Link('deploys'), |
|
| 78 | - 'approvals' => $base . $this->getCurrentEnvironment()->Link('approvals') |
|
| 75 | + 'git' => $base.$this->getCurrentProject()->Link('git'), |
|
| 76 | + 'plan' => $base.$this->getCurrentEnvironment()->Link('plan'), |
|
| 77 | + 'deploys' => $base.$this->getCurrentEnvironment()->Link('deploys'), |
|
| 78 | + 'approvals' => $base.$this->getCurrentEnvironment()->Link('approvals') |
|
| 79 | 79 | ], |
| 80 | 80 | 'api_auth' => [ |
| 81 | 81 | 'name' => $this->getSecurityToken()->getName(), |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | // failover for older deployments |
| 42 | 42 | $started = $deployment->Created; |
| 43 | 43 | $startedNice = $deployment->obj('Created')->Nice(); |
| 44 | - if($deployment->DeployStarted) { |
|
| 44 | + if ($deployment->DeployStarted) { |
|
| 45 | 45 | $started = $deployment->DeployStarted; |
| 46 | 46 | $startedNice = $deployment->obj('DeployStarted')->Nice(); |
| 47 | 47 | } |