Export job name to the shell script, too
self.job_name is something like "shell_script-${hostname}-${number}", and job_arguments doesn't contain anything like a job name, either. Change-Id: I775609990c740c29016abe89c5dce9ab81ca61b9
This commit is contained in:
parent
2221d4835b
commit
3e3deef7b8
@ -228,6 +228,10 @@ class ShellTask(Task):
|
||||
|
||||
env_args = copy.deepcopy(os.environ)
|
||||
env_args.update(self.job_arguments)
|
||||
if self.job.name.startswith('build:'):
|
||||
env_args['TH_JOB_NAME'] = self.job.name[len('build:'):]
|
||||
else:
|
||||
env_args['TH_JOB_NAME'] = self.job.name
|
||||
|
||||
self.script_return_code = utils.execute_to_log(
|
||||
cmd,
|
||||
|
Loading…
x
Reference in New Issue
Block a user