plugins depending on tests success state run also on exception

Failure notification on an exception seems important.
Now failures in this plugins will not count for build state.
This commit is contained in:
SimonHeimberg 2017-07-22 19:05:28 +02:00
parent 6a32cfb043
commit ffce3e31e7

View file

@ -217,7 +217,13 @@ class Builder implements LoggerAwareInterface
} else {
$this->build->setStatus(Build::STATUS_FAILED);
}
} catch (\Exception $ex) {
$success = false;
$this->build->setStatus(Build::STATUS_FAILED);
$this->buildLogger->logFailure('Exception: ' . $ex->getMessage(), $ex);
}
try {
if ($success) {
$this->pluginExecutor->executePlugins($this->config, Build::STAGE_SUCCESS);
@ -232,7 +238,6 @@ class Builder implements LoggerAwareInterface
}
}
} catch (\Exception $ex) {
$this->build->setStatus(Build::STATUS_FAILED);
$this->buildLogger->logFailure('Exception: ' . $ex->getMessage(), $ex);
}