LAVA: Update LAVA job submission to include a URL
Instead of just printing the JOB ID, this changeset will format a
clickable URL for the user in the jenkins jobs. This will save the user
from having to copy and paste when it comes to accessing the job.
Signed-off-by: Benjamin Copeland <ben.copeland@linaro.org>
Change-Id: I50b71502e471061a2c820a1fcac74348c4b0e0d9
diff --git a/jenkins/lava-submit.jpl b/jenkins/lava-submit.jpl
index 5103d31..ffd8ed8 100644
--- a/jenkins/lava-submit.jpl
+++ b/jenkins/lava-submit.jpl
@@ -57,8 +57,10 @@
--lava-url ${LAVA_URL} --job-dir lava_jobs \
--lava-user ${LAVA_USER} --lava-token ${LAVA_TOKEN} | egrep "^JOBS"
''', returnStdout: true).trim()
- print("${job_ids}")
- currentBuild.setDescription(job_ids)
+ job_id = job_ids.split(":")[1].trim()
+ job_url = "${LAVA_URL}/scheduler/job/${job_id}"
+ print("LAVA Job URL: ${job_url}")
+ currentBuild.setDescription(job_url)
}
}