summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishal Bhoj <vishal.bhoj@linaro.org>2017-04-12 18:54:51 +0530
committerVishal Bhoj <vishal.bhoj@linaro.org>2017-04-12 13:26:44 +0000
commit42756a06b922c73ca940b8d0b3b8b50c09d9102c (patch)
tree4536fd27ed93ee307f19fc99a99cf5773250b2d2
parent4ed4b22d4d8c08896f6984a37c33463c5672c165 (diff)
downloadpost-build-lava-42756a06b922c73ca940b8d0b3b8b50c09d9102c.tar.gz
post-build-lava.py: Provide empty string if no gerrit data
Not all jobs are triggered by gerrit trigger, in such case we pass empty string to LAVA job Change-Id: I8a31662e25c0e78ff9cef254b137e3ee454729f1 Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
-rwxr-xr-xpost-build-lava.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/post-build-lava.py b/post-build-lava.py
index c91e855..93d9f32 100755
--- a/post-build-lava.py
+++ b/post-build-lava.py
@@ -295,10 +295,10 @@ def submit_job_from_url():
replace("job.json", "%%BUNDLE_STREAM%%", os.environ.get('LAVA_STREAM', '/private/team/linaro/android-daily/'))
replace("job.json", "%%WA2_JOB_NAME%%", build_number)
replace("job.json", "%%DOWNLOAD_URL%%", download_url)
- replace("job.json", "%%GERRIT_CHANGE_NUMBER%%", os.environ.get("%%GERRIT_CHANGE_NUMBER%%"))
- replace("job.json", "%%GERRIT_PATCHSET_NUMBER%%", os.environ.get("%%GERRIT_PATCHSET_NUMBER%%"))
- replace("job.json", "%%GERRIT_CHANGE_URL%%", os.environ.get("%%GERRIT_CHANGE_URL%%"))
- replace("job.json", "%%GERRIT_CHANGE_ID%%", os.environ.get("%%GERRIT_CHANGE_ID%%"))
+ replace("job.json", "%%GERRIT_CHANGE_NUMBER%%", os.environ.get("%%GERRIT_CHANGE_NUMBER%%", ""))
+ replace("job.json", "%%GERRIT_PATCHSET_NUMBER%%", os.environ.get("%%GERRIT_PATCHSET_NUMBER%%", ""))
+ replace("job.json", "%%GERRIT_CHANGE_URL%%", os.environ.get("%%GERRIT_CHANGE_URL%%", ""))
+ replace("job.json", "%%GERRIT_CHANGE_ID%%", os.environ.get("%%GERRIT_CHANGE_ID%%", ""))
# LAVA server URL
lava_server = os.environ.get('LAVA_SERVER',