Merge "Put shell snippets into task.shell.cmd" into feature/zuulv3

This commit is contained in:
Zuul 2017-09-22 17:48:49 +00:00 committed by Gerrit Code Review
commit 56fc224fee
1 changed files with 4 additions and 2 deletions

View File

@ -657,9 +657,11 @@ class Job:
def _emitShellTask(self, data, syntax_check):
shell, data = deal_with_shebang(data)
task = collections.OrderedDict()
task['shell'] = data
# Putting the data directly into shell: causes here docs to break.
task['shell'] = collections.OrderedDict()
task['shell']['cmd'] = data
if shell:
task['args'] = dict(executable=shell)
task['shell']['executable'] = shell
if syntax_check:
# Emit a test playbook with this shell task in it then run