From 82aa3d1405cd0d468de065f59025e84e5d865dd5 Mon Sep 17 00:00:00 2001 From: Steven Cooney Date: Mon, 3 Jun 2019 16:57:50 +0100 Subject: [PATCH] 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. --- .../TeamCityXmlBuildBuilder.php | 10 +++++----- .../java/uk/xlab/teamcity/phabricator/Constants.java | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Harbormaster-Teamcity-Plugin/TeamCityXmlBuildBuilder.php b/Harbormaster-Teamcity-Plugin/TeamCityXmlBuildBuilder.php index cbbdfe2..477143a 100644 --- a/Harbormaster-Teamcity-Plugin/TeamCityXmlBuildBuilder.php +++ b/Harbormaster-Teamcity-Plugin/TeamCityXmlBuildBuilder.php @@ -24,12 +24,12 @@ final class TeamCityXmlBuildBuilder { } function addPhabBuildId($buildId){ - $this->addProperty("env.PHAB_BUILD_ID", $buildId); + $this->addProperty("phabricator.BUILD_ID", $buildId); return $this; } function addRevisionId($revisionId){ - $this->addProperty("env.PHAB_REVISION_ID", $revisionId); + $this->addProperty("phabricator.REVISION_ID", $revisionId); return $this; } @@ -37,18 +37,18 @@ final class TeamCityXmlBuildBuilder { // $this-> // root-> // setAttribute('branchName', $branchName); - $this->addProperty("env.PHAB_BRANCH_NAME", $branchName); + $this->addProperty("phabricator.BRANCH_NAME", $branchName); return $this; } function addHarbormasterPHID($phid){ - $this->addProperty('env.PHAB_HARBORMASTER_TARGET_PHID', $phid); + $this->addProperty('phabricator.HARBORMASTER_TARGET_PHID', $phid); return $this; } function addDiffId($diffId){ - $this->addProperty('env.PHAB_DIFF_ID', $diffId); + $this->addProperty('phabricator.DIFF_ID', $diffId); return $this; } diff --git a/Teamcity-Phabricator-Plugin/phabricator-plugin-common/src/main/java/uk/xlab/teamcity/phabricator/Constants.java b/Teamcity-Phabricator-Plugin/phabricator-plugin-common/src/main/java/uk/xlab/teamcity/phabricator/Constants.java index 97906e9..f5d56b5 100644 --- a/Teamcity-Phabricator-Plugin/phabricator-plugin-common/src/main/java/uk/xlab/teamcity/phabricator/Constants.java +++ b/Teamcity-Phabricator-Plugin/phabricator-plugin-common/src/main/java/uk/xlab/teamcity/phabricator/Constants.java @@ -11,9 +11,9 @@ public class Constants { public static final String PHABRICATOR_CONDUIT_TOKEN_SETTING = "plugin.conduitToken"; // Build Config - public static final String BRANCH_NAME = "env.PHAB_BRANCH_NAME"; - public static final String BUILD_ID = "env.PHAB_BUILD_ID"; - public static final String DIFF_ID = "env.PHAB_DIFF_ID"; - public static final String HARBORMASTER_PHID = "env.PHAB_HARBORMASTER_TARGET_PHID"; - public static final String REVISION_ID = "env.PHAB_REVISION_ID"; + public static final String BRANCH_NAME = "phabricator.BRANCH_NAME"; + public static final String BUILD_ID = "phabricator.BUILD_ID"; + public static final String DIFF_ID = "phabricator.DIFF_ID"; + public static final String HARBORMASTER_PHID = "phabricator.HARBORMASTER_TARGET_PHID"; + public static final String REVISION_ID = "phabricator.REVISION_ID"; }