summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishal Bhoj <vishal.bhoj@linaro.org>2017-04-04 17:25:40 +0530
committerFathi Boudra <fathi.boudra@linaro.org>2017-04-04 12:01:10 +0000
commit60c8e740516ebadb9c1265b54dcba8f84c085a85 (patch)
tree918dae5c9a909f4dec00be9101123595889d8c77
parente7c57f4f7953affb9105c7883b777f367e30c34c (diff)
downloadpost-build-lava-60c8e740516ebadb9c1265b54dcba8f84c085a85.tar.gz
Inject ART_TOKEN after dumping the job to console
Change-Id: If1dfc3625bb7b4b783a343bc824d4064ef60c8b2 Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
-rwxr-xr-xpost-build-lava.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/post-build-lava.py b/post-build-lava.py
index d49a015..649066b 100755
--- a/post-build-lava.py
+++ b/post-build-lava.py
@@ -292,7 +292,6 @@ def submit_job_from_url():
replace("job.json", "%%JOB_NAME%%", job_name)
replace("job.json", "%%ANDROID_META_BUILD%%", build_number)
replace("job.json", "%%ANDROID_META_URL%%", os.environ.get("BUILD_URL"))
- replace("job.json", "%%ART_TOKEN%%", os.environ.get("ART_TOKEN"))
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)
@@ -303,6 +302,10 @@ def submit_job_from_url():
with open("job.json", 'r') as fin:
print fin.read()
+
+ # Inject credentials after the job dump to avoid to leak
+ replace("job.json", "%%ART_TOKEN%%", os.environ.get("ART_TOKEN"))
+
with open("job.json") as fd:
config = fd.read().strip()
lava_submit(config=config, lava_server=lava_server)