From 3785f8113ebad6ec41d531c1168a133acd121269 Mon Sep 17 00:00:00 2001 From: James Rhodes Date: Fri, 8 Aug 2014 08:42:36 +1000 Subject: [PATCH] Allow build steps to create URI artifacts Summary: Ref T1049. This allows build steps to create URI artifacts, which can be used to link to external builds and other resources. Test Plan: Used a build step in an external library to test the creation of a URI artifact and verified it appeared correctly. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Maniphest Tasks: T1049 Differential Revision: https://secure.phabricator.com/D10173 --- .../storage/build/HarbormasterBuildArtifact.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/applications/harbormaster/storage/build/HarbormasterBuildArtifact.php b/src/applications/harbormaster/storage/build/HarbormasterBuildArtifact.php index 10fbdee9b8..1f34ff1a5c 100644 --- a/src/applications/harbormaster/storage/build/HarbormasterBuildArtifact.php +++ b/src/applications/harbormaster/storage/build/HarbormasterBuildArtifact.php @@ -13,7 +13,7 @@ final class HarbormasterBuildArtifact extends HarbormasterDAO const TYPE_FILE = 'file'; const TYPE_HOST = 'host'; - const TYPE_BUILD_STATE = 'buildstate'; + const TYPE_URI = 'uri'; public static function initializeNewBuildArtifact( HarbormasterBuildTarget $build_target) { @@ -69,6 +69,11 @@ final class HarbormasterBuildArtifact extends HarbormasterDAO ->setObjectName(pht('Drydock Lease')) ->setHeader($lease->getID()) ->setHref('/drydock/lease/'.$lease->getID()); + case self::TYPE_URI: + return id(new PHUIObjectItemView()) + ->setObjectName($data['name']) + ->setHeader($data['uri']) + ->setHref($data['uri']); default: return null; }