Skip to content

Commit

Permalink
[FIX] Running Complete stage even on Exception catch. (#1186)
Browse files Browse the repository at this point in the history
  • Loading branch information
Id4v authored and Dan Cryer committed Apr 27, 2016
1 parent 49db1a2 commit db93f55
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions PHPCI/Builder.php
Expand Up @@ -213,8 +213,6 @@ public function execute()
$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');
Expand All @@ -236,6 +234,9 @@ public function execute()
} 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');
}


Expand Down

0 comments on commit db93f55

Please sign in to comment.