[FIX] Running Complete stage even on Exception catch. (#1186)

This commit is contained in:
David Rimbault 2016-04-27 17:59:29 +02:00 committed by Dan Cryer
parent 49db1a26ba
commit db93f55427

View file

@ -213,8 +213,6 @@ class Builder implements LoggerAwareInterface
$this->build->setStatus(Build::STATUS_FAILED);
}
// Complete stage plugins are always run
$this->pluginExecutor->executePlugins($this->config, 'complete');
if ($success) {
$this->pluginExecutor->executePlugins($this->config, 'success');
@ -236,6 +234,9 @@ class Builder implements LoggerAwareInterface
} catch (\Exception $ex) {
$this->build->setStatus(Build::STATUS_FAILED);
$this->buildLogger->logFailure(Lang::get('exception') . $ex->getMessage());
}finally{
// Complete stage plugins are always run
$this->pluginExecutor->executePlugins($this->config, 'complete');
}