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
|
||||
args:
|
||||
chdir: "src/{{ zuul.project.canonical_name }}"
|
||||
chdir: "{{ zuul_work_dir }}"
|
||||
executable: /bin/bash
|
||||
shell: |
|
||||
# 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:
|
||||
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
|
||||
|
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
|
||||
zuul_work_dir: "src/{{ zuul.project.canonical_name }}"
|
||||
|
@ -1,6 +1,6 @@
|
||||
- name: Run code coverage
|
||||
args:
|
||||
chdir: "src/{{ zuul.project.canonical_name }}"
|
||||
chdir: "{{ zuul_work_dir }}"
|
||||
shell: |
|
||||
#!/bin/bash -xe
|
||||
|
||||
|
@ -1,2 +1,3 @@
|
||||
---
|
||||
tox_environment: venv
|
||||
zuul_work_dir: "src/{{ zuul.project.canonical_name }}"
|
||||
|
@ -1,6 +1,6 @@
|
||||
- name: Build a tarball
|
||||
args:
|
||||
chdir: "src/{{ zuul.project.canonical_name }}"
|
||||
chdir: "{{ zuul_work_dir }}"
|
||||
shell: |
|
||||
#!/bin/bash -xe
|
||||
|
||||
|
@ -1,2 +1,3 @@
|
||||
---
|
||||
tox_environment: venv
|
||||
zuul_work_dir: "src/{{ zuul.project.canonical_name }}"
|
||||
|
@ -1,6 +1,6 @@
|
||||
- name: Build a wheel
|
||||
args:
|
||||
chdir: "src/{{ zuul.project.canonical_name }}"
|
||||
chdir: "{{ zuul_work_dir }}"
|
||||
shell: |
|
||||
#!/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
|
||||
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
|
||||
|
@ -1,2 +1,3 @@
|
||||
---
|
||||
tox_environment: venv
|
||||
zuul_work_dir: "src/{{ zuul.project.canonical_name }}"
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user