Differential D7742 Diff 17507 src/applications/harbormaster/step/UploadArtifactBuildStepImplementation.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/step/UploadArtifactBuildStepImplementation.php
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | $artifact = $build->createArtifact( | ||||
$build_target, | $build_target, | ||||
$settings['name'], | $settings['name'], | ||||
HarbormasterBuildArtifact::TYPE_FILE); | HarbormasterBuildArtifact::TYPE_FILE); | ||||
$artifact->setArtifactData(array( | $artifact->setArtifactData(array( | ||||
'filePHID' => $file->getPHID())); | 'filePHID' => $file->getPHID())); | ||||
$artifact->save(); | $artifact->save(); | ||||
} | } | ||||
public function getArtifactMappings() { | |||||
$settings = $this->getSettings(); | |||||
return array( | |||||
$settings['name'] => HarbormasterBuildArtifact::TYPE_FILE); | |||||
} | |||||
public function validateSettings() { | public function validateSettings() { | ||||
$settings = $this->getSettings(); | $settings = $this->getSettings(); | ||||
if ($settings['path'] === null || !is_string($settings['path'])) { | if ($settings['path'] === null || !is_string($settings['path'])) { | ||||
return false; | return false; | ||||
} | } | ||||
if ($settings['name'] === null || !is_string($settings['name'])) { | if ($settings['name'] === null || !is_string($settings['name'])) { | ||||
return false; | return false; | ||||
Show All 36 Lines |