summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Ogden <bernie.ogden@linaro.org>2015-11-05 10:09:33 +0000
committerFathi Boudra <fathi.boudra@linaro.org>2016-04-22 08:55:29 +0000
commita2917c5559c6ba34c327d4024bfdbdf6fc5e0921 (patch)
tree89bd713b8fc88b0488b15ebb03776888b5f36d34
parent64664f32bc5dc4afedbe5161031c2e3685ffe55d (diff)
downloadpost-build-lava-a2917c5559c6ba34c327d4024bfdbdf6fc5e0921.tar.gz
Print sensible URL for multi-node jobs
Change-Id: I83e7aaf9396e984d5046f5094448fe669a2e6cba
-rwxr-xr-xpost-build-lava.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/post-build-lava.py b/post-build-lava.py
index 3f7c7a4..b3a210b 100755
--- a/post-build-lava.py
+++ b/post-build-lava.py
@@ -227,8 +227,12 @@ def lava_submit(config, lava_server):
lava_token=lava_token,
lava_server=lava_server))
lava_job_id = server.scheduler.submit_job(config)
+ if isinstance(lava_job_id, int):
+ lava_url_id = lava_job_id
+ else:
+ lava_url_id = lava_job_id[0].partition('.')[0]
print 'LAVA Job Id: %s, URL: https://%s/scheduler/job/%s' % \
- (lava_job_id, lava_server_root, lava_job_id)
+ (lava_job_id, lava_server_root, lava_url_id)
try:
lava_sub_job_defs = map(lambda sub_job: json.loads(server.scheduler.job_details(sub_job)['definition']),
lava_job_id)