Replace JENKINS_URL with JENKINS_PUBLIC_URL
To ensure tf-a-ci-scripts can run on both OpenCI
and Arm Test CI, JENKINS_URL has been replaced with
JENKINS_PUBLIC_URL, as JENKINS_URL is a reserved
private URL in Arm infrastructure.
JENKINS_PUBLIC_URL is a system-wide environment
variable and was configured in:
Manage Jenkins > System > Global Properties
Default values:
OpenCI Production Jenkins: https://ci.trustedfirmware.org/
OpenCI Staging Jenkins: https://ci.staging.trustedfirmware.org/
arm test CI: https://jenkins.openci-test.arm.com/
Change-Id: I3ddf9ebc12f2c9bf045366ee548f23df12656f8f
Signed-off-by: Arthur She <arthur.she@linaro.org>
(cherry picked from commit a813bdf49920a1295f56caa9f79f33334150c911)
diff --git a/utils.sh b/utils.sh
index 9b6310d..9af00d3 100644
--- a/utils.sh
+++ b/utils.sh
@@ -23,11 +23,11 @@
source "$host_env"
else
# Are we running on Arm infrastructure?
- if echo "$JENKINS_URL" | grep -q "oss.arm.com"; then
+ if echo "$JENKINS_PUBLIC_URL" | grep -q "oss.arm.com"; then
source "$ci_root/arm-env.sh"
- elif echo "$JENKINS_URL" | grep -q "ci.trustedfirmware.org"; then
+ elif echo "$JENKINS_PUBLIC_URL" | grep -q "ci.trustedfirmware.org"; then
source "$ci_root/openci-env.sh"
- elif echo "$JENKINS_URL" | grep -q "ci.staging.trustedfirmware.org"; then
+ elif echo "$JENKINS_PUBLIC_URL" | grep -q "ci.staging.trustedfirmware.org"; then
source "$ci_root/openci-staging-env.sh"
fi
fi
@@ -486,7 +486,7 @@
# See if execution is done by Jenkins. If called with a parameter,
# representing a 'domain', e.g. arm.com, it will also check if
-# JENKINS_URL contains the latter.
+# JENKINS_PUBLIC_URL contains the latter.
is_jenkins_env () {
local domain="${1-}"
@@ -497,7 +497,7 @@
# if no parameter passed, no more checks, quit
[ -z "$domain" ] && return 0
- if echo "$JENKINS_URL" | grep -q "$domain"; then
+ if echo "$JENKINS_PUBLIC_URL" | grep -q "$domain"; then
return 0
fi
@@ -533,7 +533,7 @@
project_filer="${nfs_volume}/projectscratch/ssg/trusted-fw"
project_scratch="${PROJECT_SCRATCH:-$project_filer/ci-workspace}"
warehouse="${nfs_volume}/warehouse"
-jenkins_url="${JENKINS_URL%/*}"
+jenkins_url="${JENKINS_PUBLIC_URL%/*}"
jenkins_url="${jenkins_url:-https://ci.trustedfirmware.org/}"
# Model revisions