1
0
Fork 0

Update Harbormaster Defined Parameter Names

We were previously setting the phabricator variabels we needs within builds to be environment variables however there are issues arount pulling out ENVS when on the agent within `buildStarted` step. To resolve the lack of environment variable access we are going to use sharedParameters which also doesn't work with variables prefixed with `env.` hence the rename.
This commit is contained in:
Steven Cooney 2019-06-03 16:57:50 +01:00
parent 31b2a424c8
commit 82aa3d1405
2 changed files with 10 additions and 10 deletions

View file

@ -24,12 +24,12 @@ final class TeamCityXmlBuildBuilder {
} }
function addPhabBuildId($buildId){ function addPhabBuildId($buildId){
$this->addProperty("env.PHAB_BUILD_ID", $buildId); $this->addProperty("phabricator.BUILD_ID", $buildId);
return $this; return $this;
} }
function addRevisionId($revisionId){ function addRevisionId($revisionId){
$this->addProperty("env.PHAB_REVISION_ID", $revisionId); $this->addProperty("phabricator.REVISION_ID", $revisionId);
return $this; return $this;
} }
@ -37,18 +37,18 @@ final class TeamCityXmlBuildBuilder {
// $this-> // $this->
// root-> // root->
// setAttribute('branchName', $branchName); // setAttribute('branchName', $branchName);
$this->addProperty("env.PHAB_BRANCH_NAME", $branchName); $this->addProperty("phabricator.BRANCH_NAME", $branchName);
return $this; return $this;
} }
function addHarbormasterPHID($phid){ function addHarbormasterPHID($phid){
$this->addProperty('env.PHAB_HARBORMASTER_TARGET_PHID', $phid); $this->addProperty('phabricator.HARBORMASTER_TARGET_PHID', $phid);
return $this; return $this;
} }
function addDiffId($diffId){ function addDiffId($diffId){
$this->addProperty('env.PHAB_DIFF_ID', $diffId); $this->addProperty('phabricator.DIFF_ID', $diffId);
return $this; return $this;
} }

View file

@ -11,9 +11,9 @@ public class Constants {
public static final String PHABRICATOR_CONDUIT_TOKEN_SETTING = "plugin.conduitToken"; public static final String PHABRICATOR_CONDUIT_TOKEN_SETTING = "plugin.conduitToken";
// Build Config // Build Config
public static final String BRANCH_NAME = "env.PHAB_BRANCH_NAME"; public static final String BRANCH_NAME = "phabricator.BRANCH_NAME";
public static final String BUILD_ID = "env.PHAB_BUILD_ID"; public static final String BUILD_ID = "phabricator.BUILD_ID";
public static final String DIFF_ID = "env.PHAB_DIFF_ID"; public static final String DIFF_ID = "phabricator.DIFF_ID";
public static final String HARBORMASTER_PHID = "env.PHAB_HARBORMASTER_TARGET_PHID"; public static final String HARBORMASTER_PHID = "phabricator.HARBORMASTER_TARGET_PHID";
public static final String REVISION_ID = "env.PHAB_REVISION_ID"; public static final String REVISION_ID = "phabricator.REVISION_ID";
} }