Add zuul_work_dir default to one-project roles

We'd like to be able to make some jobs that run tox on other projects
for ease of testing. This should allow us to do that.

Change-Id: I774a76eaaea16d8ea218b439a099b5c9335c2fc5
This commit is contained in:
Monty Taylor 2017-07-07 16:23:19 -05:00
parent 3dc03ee0d6
commit 055de47b4e
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
15 changed files with 20 additions and 8 deletions

View File

@ -0,0 +1,2 @@
---
zuul_work_dir: "src/{{ zuul.project.canonical_name }}"

View File

@ -1,7 +1,7 @@
---
- name: Install distro packages from bindep
args:
chdir: "src/{{ zuul.project.canonical_name }}"
chdir: "{{ zuul_work_dir }}"
executable: /bin/bash
shell: |
# set a default path to the preinstalled bindep entrypoint

View File

@ -0,0 +1,2 @@
---
zuul_work_dir: "src/{{ zuul.project.canonical_name }}"

View File

@ -2,5 +2,5 @@
synchronize:
dest: "{{ zuul.executor.log_root }}"
mode: pull
src: "src/{{ zuul.project.canonical_name }}/doc/build/html"
src: "{{ zuul_work_dir }}/doc/build/html"
no_log: true

View File

@ -0,0 +1,2 @@
---
zuul_work_dir: "src/{{ zuul.project.canonical_name }}"

View File

@ -1,2 +1,3 @@
---
tox_environment: cover
zuul_work_dir: "src/{{ zuul.project.canonical_name }}"

View File

@ -1,6 +1,6 @@
- name: Run code coverage
args:
chdir: "src/{{ zuul.project.canonical_name }}"
chdir: "{{ zuul_work_dir }}"
shell: |
#!/bin/bash -xe

View File

@ -1,2 +1,3 @@
---
tox_environment: venv
zuul_work_dir: "src/{{ zuul.project.canonical_name }}"

View File

@ -1,6 +1,6 @@
- name: Build a tarball
args:
chdir: "src/{{ zuul.project.canonical_name }}"
chdir: "{{ zuul_work_dir }}"
shell: |
#!/bin/bash -xe

View File

@ -1,2 +1,3 @@
---
tox_environment: venv
zuul_work_dir: "src/{{ zuul.project.canonical_name }}"

View File

@ -1,6 +1,6 @@
- name: Build a wheel
args:
chdir: "src/{{ zuul.project.canonical_name }}"
chdir: "{{ zuul_work_dir }}"
shell: |
#!/bin/bash -xe

View File

@ -0,0 +1,2 @@
---
zuul_work_dir: "src/{{ zuul.project.canonical_name }}"

View File

@ -1,12 +1,12 @@
- name: Check if project's tools/test-setup.sh exists
stat:
path: "src/{{ zuul.project.canonical_name }}/tools/test-setup.sh"
path: "{{ zuul_work_dir }}/tools/test-setup.sh"
register: p
- name: Run tools/test-setup.sh
shell: tools/test-setup.sh
args:
chdir: "src/{{ zuul.project.canonical_name }}"
chdir: "{{ zuul_work_dir }}"
when:
- p.stat.exists
- p.stat.executable

View File

@ -1,2 +1,3 @@
---
tox_environment: venv
zuul_work_dir: "src/{{ zuul.project.canonical_name }}"

View File

@ -1,6 +1,6 @@
- name: Run tox
args:
chdir: "src/{{ zuul.project.canonical_name }}"
chdir: "{{ zuul_work_dir }}"
executable: /bin/bash
shell: |
# If a bundle file is present, call tox with the jenkins version of