Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/engine/HarbormasterBuildEngine.php
Show First 20 Lines • Show All 157 Lines • ▼ Show 20 Lines | foreach ($steps as $step) { | ||||
$failed[$step->getPHID()] = true; | $failed[$step->getPHID()] = true; | ||||
} | } | ||||
if ($is_waiting) { | if ($is_waiting) { | ||||
$waiting[$step->getPHID()] = true; | $waiting[$step->getPHID()] = true; | ||||
} | } | ||||
} | } | ||||
// If every step is complete, we're done with this build. Mark it passed | // If any step failed, fail the whole build, then bail. | ||||
// and bail. | if (count($failed)) { | ||||
if (count($complete) == count($steps)) { | $build->setBuildStatus(HarbormasterBuild::STATUS_FAILED); | ||||
$build->setBuildStatus(HarbormasterBuild::STATUS_PASSED); | |||||
$build->save(); | $build->save(); | ||||
return; | return; | ||||
} | } | ||||
// If any step failed, fail the whole build, then bail. | // If every step is complete, we're done with this build. Mark it passed | ||||
if (count($failed)) { | // and bail. | ||||
$build->setBuildStatus(HarbormasterBuild::STATUS_FAILED); | if (count($complete) == count($steps)) { | ||||
$build->setBuildStatus(HarbormasterBuild::STATUS_PASSED); | |||||
$build->save(); | $build->save(); | ||||
return; | return; | ||||
} | } | ||||
// Identify all the steps which are ready to run (because all their | // Identify all the steps which are ready to run (because all their | ||||
// depdendencies are complete). | // depdendencies are complete). | ||||
$previous_step = null; | $previous_step = null; | ||||
▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines |