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: I2dee2619bb99c88ef40d37534ea8867880cb8d41
Signed-off-by: Saheer Babu <saheer.babu@arm.com>
diff --git a/eclair/post_gerrit_comment.sh b/eclair/post_gerrit_comment.sh
index d0c042b..8682e68 100755
--- a/eclair/post_gerrit_comment.sh
+++ b/eclair/post_gerrit_comment.sh
@@ -13,7 +13,7 @@
SCRIPT_DIR="$(cd "$(dirname "$0")" ; echo "${PWD}")"
# Don't post comments if run on the staging server.
-if echo "$JENKINS_URL" | grep -q "ci\.staging"; then
+if echo "$JENKINS_PUBLIC_URL" | grep -q "ci\.staging"; then
should_post_comment=0
fi
diff --git a/job/tf-ci-gateway/generate_report.sh b/job/tf-ci-gateway/generate_report.sh
index 4f9d8b7..b9e31ea 100755
--- a/job/tf-ci-gateway/generate_report.sh
+++ b/job/tf-ci-gateway/generate_report.sh
@@ -30,7 +30,7 @@
fi
# set proper jobs names for test generation report script
- if echo "$JENKINS_URL" | grep -q "oss.arm.com"; then
+ if echo "$JENKINS_PUBLIC_URL" | grep -q "oss.arm.com"; then
worker_job="${worker_job:-tf-worker}"
lava_job="${lava_job:-tf-build-for-lava}"
else
diff --git a/script/artefacts_receiver.py b/script/artefacts_receiver.py
index 227d047..b9d0f3d 100755
--- a/script/artefacts_receiver.py
+++ b/script/artefacts_receiver.py
@@ -28,7 +28,7 @@
import urllib.request
-JENKINS_URL = "http://jenkins.oss.arm.com"
+JENKINS_PUBLIC_URL = "http://jenkins.oss.arm.com"
counter = itertools.count()
exiting = False
more_consoles = threading.Event()
@@ -44,7 +44,7 @@
self.job = job
self.build = build
self.path = path
- self.url = "/".join([JENKINS_URL, "job", self.job, self.build])
+ self.url = "/".join([JENKINS_PUBLIC_URL, "job", self.job, self.build])
def download_console(self, more):
console_url = "/".join([self.url, "consoleText"])
diff --git a/script/coverity_wrapper.sh b/script/coverity_wrapper.sh
index 7a0959c..aed88ec 100644
--- a/script/coverity_wrapper.sh
+++ b/script/coverity_wrapper.sh
@@ -35,7 +35,7 @@
local need_compare
# If auth file is not provided and if on Arm infrastructure copy it
- if [ -z "$auth_file" ] && echo "$JENKINS_URL" | grep -q "oss.arm.com"; then
+ if [ -z "$auth_file" ] && echo "$JENKINS_PUBLIC_URL" | grep -q "oss.arm.com"; then
local auth_url="$project_filer/ci-files/coverity/tfcibot@$coverity_host"
url="$auth_url" saveas="$workspace/tfcibot@$coverity_host" fetch_file
auth_file="$workspace/tfcibot@$coverity_host"
diff --git a/script/fvp-launcher.sh b/script/fvp-launcher.sh
index f5a728b..b13aa8c 100755
--- a/script/fvp-launcher.sh
+++ b/script/fvp-launcher.sh
@@ -35,7 +35,7 @@
declare -A urls
## Must params
-JENKINS_URL="${1:?}"
+JENKINS_PUBLIC_URL="${1:?}"
## Optional params passed through env variables
@@ -46,11 +46,11 @@
DOCKER_CMDS_FILE="${DOCKER_CMDS_FILE:-./docker.txt}"
BM_CMDS_FILE="${BM_CMDS_FILE:-./bm.txt}"
-JENKINS_URL="${JENKINS_URL}/artifact/lava.log"
+JENKINS_PUBLIC_URL="${JENKINS_PUBLIC_URL}/artifact/lava.log"
# Fetch the LAVA log
-r_curl "${LAVA_LOG}" "${JENKINS_URL}"
+r_curl "${LAVA_LOG}" "${JENKINS_PUBLIC_URL}"
# Get download directories from the lava log
i=1
diff --git a/script/gen_merge_report.sh b/script/gen_merge_report.sh
index fed9256..434e341 100644
--- a/script/gen_merge_report.sh
+++ b/script/gen_merge_report.sh
@@ -9,7 +9,7 @@
REPORT_HTML=$2
TEST_DEF_FOLDER="${WORKSPACE}/test-definitions"
-if echo "$JENKINS_URL" | grep -q "oss.arm.com"; then
+if echo "$JENKINS_PUBLIC_URL" | grep -q "oss.arm.com"; then
ARTIFACT_PATH='artifact/html'
INFO_PATH='lcov_report/coverage.info'
JSON_PATH='output_file.json'
@@ -37,7 +37,7 @@
import json
import os
-server = os.getenv("JENKINS_URL", "https://jenkins.oss.arm.com/")
+server = os.getenv("JENKINS_PUBLIC_URL", "https://jenkins.oss.arm.com/")
merge_json = {} # json object
_files = []
with open("$REPORT_JSON") as json_file:
@@ -155,7 +155,7 @@
git checkout $TEST_DEFINITIONS_REFSPEC
popd
- if echo "$JENKINS_URL" | grep -q "oss.arm.com"; then
+ if echo "$JENKINS_PUBLIC_URL" | grep -q "oss.arm.com"; then
bash $TEST_DEF_FOLDER/scripts/tools/code_coverage/fastmodel_baremetal/bmcov/report/branch_coverage/merge.sh \
-j $MERGE_JSON -l ${OUTDIR} -p $project
else
diff --git a/script/gen_test_report.py b/script/gen_test_report.py
index d32b118..7953cfb 100755
--- a/script/gen_test_report.py
+++ b/script/gen_test_report.py
@@ -393,7 +393,7 @@
Build_job = opts.build_job
json_obj["build_job"] = Build_job
- Jenkins = os.environ["JENKINS_URL"].strip().rstrip("/")
+ Jenkins = os.environ["JENKINS_PUBLIC_URL"].strip().rstrip("/")
# Replace non-alphabetical characters in the job name with underscores. This is
# how Jenkins does it too.
diff --git a/script/test_definitions.sh b/script/test_definitions.sh
index f81bdb8..d8009cf 100644
--- a/script/test_definitions.sh
+++ b/script/test_definitions.sh
@@ -4,7 +4,7 @@
#
# SPDX-License-Identifier: BSD-3-Clause
#
-if echo "$JENKINS_URL" | grep -q "oss.arm.com"; then
+if echo "$JENKINS_PUBLIC_URL" | grep -q "oss.arm.com"; then
export GERRIT_URL=${GERRIT_URL:-https://gerrit.oss.arm.com}
export TEST_DEFINITIONS_REPO=${TEST_DEFINITIONS_REPO:-${GERRIT_URL}/tests/lava/test-definitions.git}
diff --git a/script/tf-coverity/common-def.sh b/script/tf-coverity/common-def.sh
index a165980..cecedab 100644
--- a/script/tf-coverity/common-def.sh
+++ b/script/tf-coverity/common-def.sh
@@ -38,7 +38,7 @@
# infrastructure)
is_arm_jenkins_env() {
if [ "$JENKINS_HOME" ]; then
- if echo "$JENKINS_URL" | grep -q "oss.arm.com"; then
+ if echo "$JENKINS_PUBLIC_URL" | grep -q "oss.arm.com"; then
return 0;
fi
fi
diff --git a/utils.sh b/utils.sh
index 0cf0915..87899b3 100644
--- a/utils.sh
+++ b/utils.sh
@@ -21,15 +21,15 @@
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"
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
@@ -542,7 +542,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-}"
@@ -553,7 +553,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
@@ -589,7 +589,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