run_lava_job: Save lavacli configuration in working directory
'run_lava_job' script execution in 'tf-worker' job failed
randomly with below errors:
02:00:31 + python3 /arm/projectscratch/ssg/trusted-fw/ci-workspace/
tf-main-2010/trusted-firmware-ci/job/tf-worker/run_lava.py /arm/
projectscratch/ssg/trusted-fw/ci-workspace/tf-main-2010/
trusted-firmware-ci/job/tf-worker/run_lava_job.sh artefacts/release/
juno.yaml --username **** --token ****
02:00:31 Already using interpreter /usr/bin/python3
02:00:31 Using base prefix '/usr'
02:00:31 New python executable in /work/workspace/workspace/tf-worker_ws_13/
venv/bin/python3
02:00:31 Also creating executable in /work/workspace/workspace/
tf-worker_ws_13/venv/bin/python
02:00:31 Installing setuptools, pkg_resources, pip, wheel...done.
02:00:37 Job url: [https://lava.oss.arm.com/scheduler/job/198042]
02:00:37 Unknown identity 'default'
02:00:37 CRITICAL:root:Job script returned error code 1
This issue fixed by saving the lavacli configuration in the working
directory instead of always deleting old configuration at the start of
the execution of 'run_lava_job' script.
Change-Id: I883dc16df91bf84c6fba2f0a3247b3d7788a0540
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
diff --git a/job/tf-worker/run_lava_job.sh b/job/tf-worker/run_lava_job.sh
index 162b0de..f9725b5 100755
--- a/job/tf-worker/run_lava_job.sh
+++ b/job/tf-worker/run_lava_job.sh
@@ -20,6 +20,8 @@
source "$CI_ROOT/utils.sh"
+export XDG_CONFIG_HOME="${WORKSPACE}"
+
JOB_FILE="$1"
SAVE_OUTPUT="$2"
@@ -38,8 +40,6 @@
source venv/bin/activate
pip install -q lavacli
-rm -f ~/.config/lavacli.yaml
-
# Configure lavacli
lavacli identities add \
--username $LAVA_USER \