From 2895b7c5dd5e411f2e843518ff1d15064810a915 Mon Sep 17 00:00:00 2001 From: Kevin Hilman Date: Fri, 26 May 2017 22:11:18 +0000 Subject: ci-platform-jjb: try LAVA job in multiple labs Currently, LAVA jobs are only submitted to a single lab. This patch adds the ability look for a matching device-type in a list of available labs, and submit the job to the first lab with an available device type. To accomplish this, the job submission part is removed from run-test-short.sh, which now only generates the LAVA YAML job. A new lava-jobs-submit.sh script is added which looks for an available device-type in a list of LAVA labs, and submits the job there. NOTES: - run-test-short.sh should probably be renamed, but was left for now to limit the diff Change-Id: I95086d89a95f39e2b59fec8a8afada70806c52e5 Signed-off-by: Kevin Hilman --- jjb/common/include-agl-run-test-short.sh | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'jjb/common/include-agl-run-test-short.sh') diff --git a/jjb/common/include-agl-run-test-short.sh b/jjb/common/include-agl-run-test-short.sh index 26795d46..ee7b6230 100644 --- a/jjb/common/include-agl-run-test-short.sh +++ b/jjb/common/include-agl-run-test-short.sh @@ -120,31 +120,3 @@ sed -i -e "s#@REPLACE_KERNEL_CMDLINE@#${DEVICE_KERNEL_CMDLINE}#g" testjob.yaml cat testjob.yaml -lava-tool submit-job --block https://agl-jenkins-user@lava.automotivelinux.org testjob.yaml | tee .myjob - -MYJOB=`cat .myjob | grep "submitted as job" | sed -e "s#submitted as job id: ##g"` - -echo "#### JOBID: $MYJOB #####" - -( lava-tool job-status https://agl-jenkins-user@lava.automotivelinux.org $MYJOB | tee .status ) || true -STATUS=`grep "Job Status:" .status | sed -e "s#Job Status: ##g"` - -if [ x"Complete" = x"$STATUS" ] ; then - echo "YAY! $STATUS" - curl -o plain_output.yaml https://lava.automotivelinux.org/scheduler/job/$MYJOB/log_file/plain - cat plain_output.yaml | grep '"target",' | sed -e 's#- {"dt".*"lvl".*"msg":."##g' -e 's#"}$##g' - - # cleanup - #ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 rm -rf /srv/download/AGL/upload/ci/${CHID}/ - - exit 0 -else - echo "Nooooooooo! $STATUS" - curl -o plain_output.yaml https://lava.automotivelinux.org/scheduler/job/$MYJOB/log_file/plain - cat plain_output.yaml | grep '"target",' | sed -e 's#- {"dt".*"lvl".*"msg":."##g' -e 's#"}$##g' - - # cleanup - #ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 rm -rf /srv/download/AGL/upload/ci/${CHID}/ - - exit 1 -fi -- cgit 1.2.3-korg