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: I59264f434fc162b5a8122688a0102269b3cb792c
Signed-off-by: Saheer Babu <saheer.babu@arm.com>
diff --git a/utils.sh b/utils.sh
index 82cd731..58c5801 100644
--- a/utils.sh
+++ b/utils.sh
@@ -26,9 +26,9 @@
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
if echo "$TF_GERRIT_BRANCH" | grep -q "lts-v2.8"; then
source "$ci_root/openci-lts-v2.8-env.sh"
elif echo "$TF_GERRIT_BRANCH" | grep -q "lts-v2.10"; then
@@ -36,7 +36,7 @@
else
source "$ci_root/openci-env.sh"
fi
- 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
@@ -495,7 +495,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-}"
@@ -506,7 +506,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
@@ -542,8 +542,8 @@
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_url:-https://ci.trustedfirmware.org/}"
+jenkins_url="${JENKINS_PUBLIC_URL%/*}"
+JENKINS_PUBLIC_URL="${JENKINS_PUBLIC_URL:-https://ci.trustedfirmware.org/}"
# Model revisions
model_version_11_24="${model_version:-11.24}"