Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/worker/HarbormasterBuildWorker.php
Show All 38 Lines | try { | ||||
// Perform the build. | // Perform the build. | ||||
foreach ($steps as $step) { | foreach ($steps as $step) { | ||||
$implementation = $step->getStepImplementation(); | $implementation = $step->getStepImplementation(); | ||||
if (!$implementation->validateSettings()) { | if (!$implementation->validateSettings()) { | ||||
$build->setBuildStatus(HarbormasterBuild::STATUS_ERROR); | $build->setBuildStatus(HarbormasterBuild::STATUS_ERROR); | ||||
break; | break; | ||||
} | } | ||||
$implementation->execute($build); | $implementation->execute($build->createRemoteBuild()); | ||||
if ($build->getBuildStatus() !== HarbormasterBuild::STATUS_BUILDING) { | if ($build->getBuildStatus() !== HarbormasterBuild::STATUS_BUILDING) { | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
// If we get to here, then the build has finished. Set it to passed | // If we get to here, then the build has finished. Set it to passed | ||||
// if no build step explicitly set the status. | // if no build step explicitly set the status. | ||||
if ($build->getBuildStatus() === HarbormasterBuild::STATUS_BUILDING) { | if ($build->getBuildStatus() === HarbormasterBuild::STATUS_BUILDING) { | ||||
Show All 14 Lines |