From 977a65422a99b8e314d80f5aa820a2931cd345cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= Date: Thu, 27 Nov 2014 23:16:36 +0100 Subject: [PATCH] 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 --- turbo_hipster/lib/models.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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