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:
parent
3dc03ee0d6
commit
055de47b4e
2
roles/bindep/defaults/main.yaml
Normal file
2
roles/bindep/defaults/main.yaml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
zuul_work_dir: "src/{{ zuul.project.canonical_name }}"
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Install distro packages from bindep
|
- name: Install distro packages from bindep
|
||||||
args:
|
args:
|
||||||
chdir: "src/{{ zuul.project.canonical_name }}"
|
chdir: "{{ zuul_work_dir }}"
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
shell: |
|
shell: |
|
||||||
# set a default path to the preinstalled bindep entrypoint
|
# set a default path to the preinstalled bindep entrypoint
|
||||||
|
2
roles/fetch-sphinx-output/defaults/main.yaml
Normal file
2
roles/fetch-sphinx-output/defaults/main.yaml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
zuul_work_dir: "src/{{ zuul.project.canonical_name }}"
|
@ -2,5 +2,5 @@
|
|||||||
synchronize:
|
synchronize:
|
||||||
dest: "{{ zuul.executor.log_root }}"
|
dest: "{{ zuul.executor.log_root }}"
|
||||||
mode: pull
|
mode: pull
|
||||||
src: "src/{{ zuul.project.canonical_name }}/doc/build/html"
|
src: "{{ zuul_work_dir }}/doc/build/html"
|
||||||
no_log: true
|
no_log: true
|
||||||
|
2
roles/run-bindep/defaults/main.yaml
Normal file
2
roles/run-bindep/defaults/main.yaml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
zuul_work_dir: "src/{{ zuul.project.canonical_name }}"
|
@ -1,2 +1,3 @@
|
|||||||
---
|
---
|
||||||
tox_environment: cover
|
tox_environment: cover
|
||||||
|
zuul_work_dir: "src/{{ zuul.project.canonical_name }}"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
- name: Run code coverage
|
- name: Run code coverage
|
||||||
args:
|
args:
|
||||||
chdir: "src/{{ zuul.project.canonical_name }}"
|
chdir: "{{ zuul_work_dir }}"
|
||||||
shell: |
|
shell: |
|
||||||
#!/bin/bash -xe
|
#!/bin/bash -xe
|
||||||
|
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
---
|
---
|
||||||
tox_environment: venv
|
tox_environment: venv
|
||||||
|
zuul_work_dir: "src/{{ zuul.project.canonical_name }}"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
- name: Build a tarball
|
- name: Build a tarball
|
||||||
args:
|
args:
|
||||||
chdir: "src/{{ zuul.project.canonical_name }}"
|
chdir: "{{ zuul_work_dir }}"
|
||||||
shell: |
|
shell: |
|
||||||
#!/bin/bash -xe
|
#!/bin/bash -xe
|
||||||
|
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
---
|
---
|
||||||
tox_environment: venv
|
tox_environment: venv
|
||||||
|
zuul_work_dir: "src/{{ zuul.project.canonical_name }}"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
- name: Build a wheel
|
- name: Build a wheel
|
||||||
args:
|
args:
|
||||||
chdir: "src/{{ zuul.project.canonical_name }}"
|
chdir: "{{ zuul_work_dir }}"
|
||||||
shell: |
|
shell: |
|
||||||
#!/bin/bash -xe
|
#!/bin/bash -xe
|
||||||
|
|
||||||
|
2
roles/test-setup/defaults/main.yaml
Normal file
2
roles/test-setup/defaults/main.yaml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
zuul_work_dir: "src/{{ zuul.project.canonical_name }}"
|
@ -1,12 +1,12 @@
|
|||||||
- name: Check if project's tools/test-setup.sh exists
|
- name: Check if project's tools/test-setup.sh exists
|
||||||
stat:
|
stat:
|
||||||
path: "src/{{ zuul.project.canonical_name }}/tools/test-setup.sh"
|
path: "{{ zuul_work_dir }}/tools/test-setup.sh"
|
||||||
register: p
|
register: p
|
||||||
|
|
||||||
- name: Run tools/test-setup.sh
|
- name: Run tools/test-setup.sh
|
||||||
shell: tools/test-setup.sh
|
shell: tools/test-setup.sh
|
||||||
args:
|
args:
|
||||||
chdir: "src/{{ zuul.project.canonical_name }}"
|
chdir: "{{ zuul_work_dir }}"
|
||||||
when:
|
when:
|
||||||
- p.stat.exists
|
- p.stat.exists
|
||||||
- p.stat.executable
|
- p.stat.executable
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
---
|
---
|
||||||
tox_environment: venv
|
tox_environment: venv
|
||||||
|
zuul_work_dir: "src/{{ zuul.project.canonical_name }}"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
- name: Run tox
|
- name: Run tox
|
||||||
args:
|
args:
|
||||||
chdir: "src/{{ zuul.project.canonical_name }}"
|
chdir: "{{ zuul_work_dir }}"
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
shell: |
|
shell: |
|
||||||
# If a bundle file is present, call tox with the jenkins version of
|
# If a bundle file is present, call tox with the jenkins version of
|
||||||
|
Loading…
x
Reference in New Issue
Block a user