Coverity: move coverity token outside of CI repo
Currently the authentication token for Coverity servers
is only used by Arm servers, therefore move it to Arm internal location.
The new location is /arm/projectscratch/ssg/trusted-fw/ci-files/coverity
Change-Id: I70ff7ea9567f284eb593d4d45106c2ffe07e053b
Signed-off-by: Zelalem <zelalem.aweke@arm.com>
diff --git a/script/coverity_wrapper.sh b/script/coverity_wrapper.sh
index 374e7fa..e9e4cd9 100644
--- a/script/coverity_wrapper.sh
+++ b/script/coverity_wrapper.sh
@@ -27,13 +27,24 @@
local cov_dir="$workspace/coverity"
local cov_compiler="${cov_compiler:-${CROSS_COMPILE}gcc}"
- local auth_file="${cov_auth_file:-$ci_root/coverity/tfcibot@$coverity_host}"
+ local auth_file="$cov_auth_file"
local makefile="$ci_root/script/coverity-Makefile"
local defects_summary="$workspace/defects-summary.txt"
local description
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 "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"
+ fi
+
+ if [ -z "$auth_file" ]; then
+ die "Coverity authentication token not provided"
+ fi
+
echo_w
mkdir -p "$cov_dir"