Add deploy stage

This commit is contained in:
Stepan Strelets 2017-03-16 15:50:34 +03:00 committed by Dmitry Khomutov
parent 075be27691
commit 788aeb161a
2 changed files with 4 additions and 1 deletions

View file

@ -190,7 +190,7 @@ class Builder implements LoggerAwareInterface
$this->setupBuild();
// Run the core plugin stages:
foreach (['setup', 'test'] as $stage) {
foreach (['setup', 'test', 'deploy'] as $stage) {
$success &= $this->pluginExecutor->executePlugins($this->config, $stage);
}

View file

@ -154,6 +154,9 @@ class Executor
// If we're in the "setup" stage, execution should not continue after
// a plugin has failed:
throw new Exception('Plugin failed: ' . $plugin);
} elseif ($stage === 'deploy') {
$this->logger->logFailure('PLUGIN: FAILED');
$success = false;
} else {
// If we're in the "test" stage and the plugin is not allowed to fail,
// then mark the build as failed: