aboutsummaryrefslogtreecommitdiffstats
path: root/jjb/common/include-agl-lava-jobs-submit-only.sh
diff options
context:
space:
mode:
authorKhouloud Touil <ktouil@baylibre.com>2019-04-02 10:49:17 +0200
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>2019-04-29 16:33:51 +0200
commit00a7f42b60833d481f6476fee453c1192a395a0b (patch)
tree1ad6df6399dbcaf6fb89224724ec2d8bf0ff5007 /jjb/common/include-agl-lava-jobs-submit-only.sh
parent3d2d6114b0dda535e5515d2e083d8e59f821b93a (diff)
Replace lava-tool with lavacli
In order to move totally to lavacli, this patch: - Apply changes to submit jobs using lavacli. As the blocking call (--block) no longer exists with lavacli, so had to replace that with a polling loop. - Replace lava-tool with lavacli in the polling part in the labs-prepare file, which checks the device status and availability. Different changes tested at Baylibre. Change-Id: I25b1ad4b47ae09a158e1e1cf42e30da5e6aa8b57 Signed-off-by: Khouloud Touil <ktouil@baylibre.com>
Diffstat (limited to 'jjb/common/include-agl-lava-jobs-submit-only.sh')
-rw-r--r--jjb/common/include-agl-lava-jobs-submit-only.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/jjb/common/include-agl-lava-jobs-submit-only.sh b/jjb/common/include-agl-lava-jobs-submit-only.sh
index a8354390..f2a20fe0 100644
--- a/jjb/common/include-agl-lava-jobs-submit-only.sh
+++ b/jjb/common/include-agl-lava-jobs-submit-only.sh
@@ -19,8 +19,12 @@ cat $JOB_FILE | sed "s/device_type: $releng_device$/device_type: $lava_device/"
#
# LAVA job submit, get job ID from lava-tool output
#
-JOB_STATUS="${JOB_BASE}_${LAVA_LAB}.status"
-lava-tool submit-job --block $full_url $JOB_FILE_NEW |tee $JOB_STATUS
+job_id=$(lavacli -i $lab jobs submit $JOB_FILE_NEW)
+if [ $? -ne 0 ]; then
+ echo "ERROR: job submission error"
+ exit 1
+fi
# Printing the job URL in the log
-grep "submitted as job:" $JOB_STATUS
+JOB_URL="${url}scheduler/job/${job_id}"
+echo "Submitted as job: $JOB_URL"