Use environment variable for download server

To ensure tf-a-ci-scripts can run on both OpenCI
and Arm CI, replace ci.trustedfirmware.org with
enironment variable.

DOWNLOAD_SERVER_URL is a system-wide environment
variable and was configured in:
Manage Jenkins > System > Global Properties

Change-Id: Ia8f141fe03dc1f68990bcc4aeea2e90019f9875b
Signed-off-by: Saheer Babu <saheer.babu@arm.com>
diff --git a/arm-env.sh b/arm-env.sh
index 25999f9..0930990 100644
--- a/arm-env.sh
+++ b/arm-env.sh
@@ -11,7 +11,7 @@
 
 nfs_volume="/arm"
 jenkins_url="https://jenkins.oss.arm.com"
-tfa_downloads="https://downloads.trustedfirmware.org/tf-a"
+tfa_downloads="${DOWNLOAD_SERVER_URL}/tf-a"
 ci_env="armci"
 
 # Source repositories.
diff --git a/job/tf-worker/run_fvp_test.sh b/job/tf-worker/run_fvp_test.sh
index 8ad56b6..b41f550 100755
--- a/job/tf-worker/run_fvp_test.sh
+++ b/job/tf-worker/run_fvp_test.sh
@@ -25,7 +25,7 @@
 	LIST_OF_BINARIES=""
 	OBJDUMP="$(which 'aarch64-none-elf-objdump')"
 	READELF="$(which 'aarch64-none-elf-readelf')"
-	FALLBACK_PLUGIN_URL="${FALLBACK_PLUGIN_URL:-https://downloads.trustedfirmware.org/coverage-plugin/qa-tools/coverage-tool}"
+	FALLBACK_PLUGIN_URL="${FALLBACK_PLUGIN_URL:-${DOWNLOAD_SERVER_URL}/coverage-plugin/qa-tools/coverage-tool}"
 	FALLBACK_PLUGIN_URL_ALT="${FALLBACK_PLUGIN_URL_ALT:-https://artifactory.eu02.arm.com/artifactory/trustedfirmware.downloads/coverage-plugin}"
 	FALLBACK_FILES="${FALLBACK_FILES:-coverage_trace.so,coverage_trace.o,plugin_utils.o}"
 	FALLBACK_FILES_ALT="${FALLBACK_FILES_ALT:-CoverageTrace.so,CoverageTrace.o,PluginUtils.o}"
diff --git a/openci-env.sh b/openci-env.sh
index 9b75ab3..1e6a554 100644
--- a/openci-env.sh
+++ b/openci-env.sh
@@ -11,11 +11,11 @@
 
 nfs_volume="${WORKSPACE:?}/nfs"
 jenkins_url="${JENKINS_PUBLIC_URL}"
-tfa_downloads="https://downloads.trustedfirmware.org/tf-a"
+tfa_downloads="${DOWNLOAD_SERVER_URL}/tf-a"
 ci_env="openci"
 
 tfa_branch=${TF_GERRIT_BRANCH##*/}
 if echo $tfa_branch | grep -q "^lts-v"; then
     # LTS branch, change the download space to the respective one
-    tfa_downloads="https://downloads.trustedfirmware.org/tf-a-$tfa_branch"
+    tfa_downloads="${DOWNLOAD_SERVER_URL}/tf-a-$tfa_branch"
 fi
diff --git a/openci-staging-env.sh b/openci-staging-env.sh
index c4844cc..b242100 100644
--- a/openci-staging-env.sh
+++ b/openci-staging-env.sh
@@ -11,11 +11,11 @@
 
 nfs_volume="${WORKSPACE:?}/nfs"
 jenkins_url="${JENKINS_PUBLIC_URL}"
-tfa_downloads="https://downloads.trustedfirmware.org/tf-a"
+tfa_downloads="${DOWNLOAD_SERVER_URL}/tf-a"
 ci_env="openci_staging"
 
 tfa_branch=${TF_GERRIT_BRANCH##*/}
 if echo $tfa_branch | grep -q "^lts-v"; then
     # LTS branch, change the download space to the respective one
-    tfa_downloads="https://downloads.trustedfirmware.org/tf-a-$tfa_branch"
+    tfa_downloads="${DOWNLOAD_SERVER_URL}/tf-a-$tfa_branch"
 fi
diff --git a/script/tf-coverity/run_coverity_on_tf.py b/script/tf-coverity/run_coverity_on_tf.py
index 457f38b..c4cca31 100755
--- a/script/tf-coverity/run_coverity_on_tf.py
+++ b/script/tf-coverity/run_coverity_on_tf.py
@@ -37,7 +37,7 @@
 
 def get_coverity_tool():
     coverity_tarball = "coverity_tool.tgz"
-    url = "https://downloads.trustedfirmware.org/tf-a/tf-a-coverity/" + coverity_tarball
+    url = "${DOWNLOAD_SERVER_URL}/tf-a/tf-a-coverity/" + coverity_tarball
     print("Downloading Coverity Build tool from %s..." % url)
     file_handle = urllib.request.urlopen(url)
     output = open(coverity_tarball, "wb")
diff --git a/script/tf-coverity/tf-cov-make b/script/tf-coverity/tf-cov-make
index 7c19a7e..9497d58 100755
--- a/script/tf-coverity/tf-cov-make
+++ b/script/tf-coverity/tf-cov-make
@@ -613,7 +613,7 @@
 
 # Source files from mv-ddr-marvell repository are necessary
 # to build below four platforms
-wget https://downloads.trustedfirmware.org/tf-a/mv-ddr-marvell/mv-ddr-marvell-5d41a995637de1dbc93f193db6ef0c8954cab316.tar.gz 2> /dev/null
+wget ${DOWNLOAD_SERVER_URL}/tf-a/mv-ddr-marvell/mv-ddr-marvell-5d41a995637de1dbc93f193db6ef0c8954cab316.tar.gz 2> /dev/null
 tar -xzf mv-ddr-marvell-5d41a995637de1dbc93f193db6ef0c8954cab316.tar.gz 2> /dev/null
 mv mv-ddr-marvell drivers/marvell/mv_ddr