1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 20:10:55 +01:00

Correctly calculate "any_failed"

Summary: See T10746.

Test Plan: Fail one of several builds, run `./bin/harbormaster update`, see that Build Status is Failed.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, O14 ATC Monitoring, yelirekim

Maniphest Tasks: T10746

Differential Revision: https://secure.phabricator.com/D16480
This commit is contained in:
Aviv Eyal 2016-08-31 21:35:57 +00:00 committed by avivey
parent 4dacf4d3ad
commit 25a7266d15

View file

@ -446,11 +446,14 @@ final class HarbormasterBuildEngine extends Phobject {
if ($build->getBuildStatus() != HarbormasterBuildStatus::STATUS_PASSED) {
$all_pass = false;
}
$any_fail = in_array($build->getBuildStatus(), array(
if (in_array($build->getBuildStatus(), array(
HarbormasterBuildStatus::STATUS_FAILED,
HarbormasterBuildStatus::STATUS_ERROR,
HarbormasterBuildStatus::STATUS_DEADLOCKED,
));
))) {
$any_fail = true;
}
}
if ($any_fail) {