summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kundrát <jkt@kde.org>2014-11-27 23:16:36 +0100
committerJan Kundrát <jkt@kde.org>2014-11-27 23:16:36 +0100
commit977a65422a99b8e314d80f5aa820a2931cd345cd (patch)
treee9ca95a2a018d06ee2cb259ea0b541dea9684d6a
parent7391edb0aa9d2965b9726e536df5ad7e6c4686e8 (diff)
downloadturbo-hipster-977a65422a99b8e314d80f5aa820a2931cd345cd.tar.gz
Pass all zuul arguments to the job's shell script
The idea is that Zuul passes a lot of useful information, such as the project name, target branch etc., as ZUUL_* options within the JSON job data. Let's pass all of these variables to the launched shell script. This will make it possible to e.g. have a single script that can do the "right thing" for different projects with distinct build steps, etc. Change-Id: I6f57ed19e9eef1b987fe2493d409b3ee51af22b6
-rw-r--r--turbo_hipster/lib/models.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/turbo_hipster/lib/models.py b/turbo_hipster/lib/models.py
index b5c6b8e..c96a075 100644
--- a/turbo_hipster/lib/models.py
+++ b/turbo_hipster/lib/models.py
@@ -210,9 +210,14 @@ class ShellTask(Task):
'unique_id': self.job.unique
}
)
+
+ env_args = copy.deepcopy(os.environ)
+ env_args.update(self.job_arguments)
+
self.script_return_code = utils.execute_to_log(
cmd,
- self.shell_output_log
+ self.shell_output_log,
+ env=env_args
)
@common.task_step