commit | 490cf04f71569c99bdb2974871fb405de1e9a405 | [log] [tgz] |
---|---|---|
author | James E. Blair <jeblair@redhat.com> | Fri Feb 24 23:07:21 2017 -0500 |
committer | James E. Blair <jeblair@redhat.com> | Tue Feb 28 07:43:39 2017 -0800 |
tree | 4ff7b9149a7593d817b1b469314ddca23f8d1a04 | |
parent | e1e92d677f1c8d0fedebb1721c889ac8b92e4d0b [diff] |
Plumb job variables through to ansible Change-Id: Ifc64fce1870fa2c0d205d6177af4896614303226
diff --git a/tests/base.py b/tests/base.py index b8f9d0c..e6542e7 100755 --- a/tests/base.py +++ b/tests/base.py
@@ -732,7 +732,7 @@ self.running_builds.append(build) self.job_builds[job.unique] = build args = json.loads(job.arguments) - args['zuul']['_test'] = dict(test_root=self._test_root) + args['vars']['zuul']['_test'] = dict(test_root=self._test_root) job.arguments = json.dumps(args) self.job_workers[job.unique] = RecordingAnsibleJob(self, job) self.job_workers[job.unique].run()
diff --git a/tests/fixtures/config/ansible/git/common-config/playbooks/python27.yaml b/tests/fixtures/config/ansible/git/common-config/playbooks/python27.yaml index 6b79a78..45acb87 100644 --- a/tests/fixtures/config/ansible/git/common-config/playbooks/python27.yaml +++ b/tests/fixtures/config/ansible/git/common-config/playbooks/python27.yaml
@@ -1,7 +1,7 @@ - hosts: all tasks: - file: - path: "{{zuul._test.test_root}}/{{zuul.uuid}}.flag" + path: "{{flagpath}}" state: touch - copy: src: "{{zuul._test.test_root}}/{{zuul.uuid}}.flag"
diff --git a/tests/fixtures/config/ansible/git/common-config/zuul.yaml b/tests/fixtures/config/ansible/git/common-config/zuul.yaml index 7373eff..baa7aba 100644 --- a/tests/fixtures/config/ansible/git/common-config/zuul.yaml +++ b/tests/fixtures/config/ansible/git/common-config/zuul.yaml
@@ -40,5 +40,7 @@ name: python27 pre-run: pre post-run: post + vars: + flagpath: "{{zuul._test.test_root}}/{{zuul.uuid}}.flag" roles: - zuul: bare-role