mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-08-29 18:48:56 +02:00
[Nostromo] Test coverage
This commit is contained in:
@@ -116,7 +116,7 @@ class DeployCommand extends AbstractCommand
|
|||||||
// Run "Pre Deploy" Tasks
|
// Run "Pre Deploy" Tasks
|
||||||
$this->runtime->setStage(Runtime::PRE_DEPLOY);
|
$this->runtime->setStage(Runtime::PRE_DEPLOY);
|
||||||
if (!$this->runTasks($output, $strategy->getPreDeployTasks())) {
|
if (!$this->runTasks($output, $strategy->getPreDeployTasks())) {
|
||||||
$this->halt();
|
throw $this->getException();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run "On Deploy" Tasks
|
// Run "On Deploy" Tasks
|
||||||
@@ -134,7 +134,7 @@ class DeployCommand extends AbstractCommand
|
|||||||
// Run "Post Deploy" Tasks
|
// Run "Post Deploy" Tasks
|
||||||
$this->runtime->setStage(Runtime::POST_DEPLOY);
|
$this->runtime->setStage(Runtime::POST_DEPLOY);
|
||||||
if (!$this->runTasks($output, $strategy->getPostDeployTasks())) {
|
if (!$this->runTasks($output, $strategy->getPostDeployTasks())) {
|
||||||
$this->halt();
|
throw $this->getException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -149,7 +149,7 @@ class DeployCommand extends AbstractCommand
|
|||||||
$this->runtime->setWorkingHost($host);
|
$this->runtime->setWorkingHost($host);
|
||||||
if (!$this->runTasks($output, $tasks)) {
|
if (!$this->runTasks($output, $tasks)) {
|
||||||
$this->runtime->setWorkingHost(null);
|
$this->runtime->setWorkingHost(null);
|
||||||
$this->halt();
|
throw $this->getException();
|
||||||
}
|
}
|
||||||
$this->runtime->setWorkingHost(null);
|
$this->runtime->setWorkingHost(null);
|
||||||
}
|
}
|
||||||
@@ -231,12 +231,10 @@ class DeployCommand extends AbstractCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Halts the current process
|
* Exception for halting the the current process
|
||||||
*
|
|
||||||
* @throws RuntimeException
|
|
||||||
*/
|
*/
|
||||||
protected function halt()
|
protected function getException()
|
||||||
{
|
{
|
||||||
throw new RuntimeException(sprintf('Stage "%s" did not finished successfully, halting command.', $this->getStageName()), 50);
|
return new RuntimeException(sprintf('Stage "%s" did not finished successfully, halting command.', $this->getStageName()), 50);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user