diff --git a/roles/bindep/defaults/main.yaml b/roles/bindep/defaults/main.yaml new file mode 100644 index 000000000..a0afa22c5 --- /dev/null +++ b/roles/bindep/defaults/main.yaml @@ -0,0 +1,2 @@ +--- +zuul_work_dir: "src/{{ zuul.project.canonical_name }}" diff --git a/roles/bindep/tasks/main.yaml b/roles/bindep/tasks/main.yaml index 3ed80389c..90be192f4 100644 --- a/roles/bindep/tasks/main.yaml +++ b/roles/bindep/tasks/main.yaml @@ -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 diff --git a/roles/fetch-sphinx-output/defaults/main.yaml b/roles/fetch-sphinx-output/defaults/main.yaml new file mode 100644 index 000000000..a0afa22c5 --- /dev/null +++ b/roles/fetch-sphinx-output/defaults/main.yaml @@ -0,0 +1,2 @@ +--- +zuul_work_dir: "src/{{ zuul.project.canonical_name }}" diff --git a/roles/fetch-sphinx-output/tasks/main.yaml b/roles/fetch-sphinx-output/tasks/main.yaml index 88e00b341..22c3ce5cc 100644 --- a/roles/fetch-sphinx-output/tasks/main.yaml +++ b/roles/fetch-sphinx-output/tasks/main.yaml @@ -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 diff --git a/roles/run-bindep/defaults/main.yaml b/roles/run-bindep/defaults/main.yaml new file mode 100644 index 000000000..a0afa22c5 --- /dev/null +++ b/roles/run-bindep/defaults/main.yaml @@ -0,0 +1,2 @@ +--- +zuul_work_dir: "src/{{ zuul.project.canonical_name }}" diff --git a/roles/run-cover/defaults/main.yaml b/roles/run-cover/defaults/main.yaml index 362a70046..d0c50c392 100644 --- a/roles/run-cover/defaults/main.yaml +++ b/roles/run-cover/defaults/main.yaml @@ -1,2 +1,3 @@ --- tox_environment: cover +zuul_work_dir: "src/{{ zuul.project.canonical_name }}" diff --git a/roles/run-cover/tasks/main.yaml b/roles/run-cover/tasks/main.yaml index eb2494341..d12a2d397 100644 --- a/roles/run-cover/tasks/main.yaml +++ b/roles/run-cover/tasks/main.yaml @@ -1,6 +1,6 @@ - name: Run code coverage args: - chdir: "src/{{ zuul.project.canonical_name }}" + chdir: "{{ zuul_work_dir }}" shell: | #!/bin/bash -xe diff --git a/roles/run-tarball/defaults/main.yaml b/roles/run-tarball/defaults/main.yaml index c6897080a..014e98cfe 100644 --- a/roles/run-tarball/defaults/main.yaml +++ b/roles/run-tarball/defaults/main.yaml @@ -1,2 +1,3 @@ --- tox_environment: venv +zuul_work_dir: "src/{{ zuul.project.canonical_name }}" diff --git a/roles/run-tarball/tasks/main.yaml b/roles/run-tarball/tasks/main.yaml index 426834b65..26ea6c0d0 100644 --- a/roles/run-tarball/tasks/main.yaml +++ b/roles/run-tarball/tasks/main.yaml @@ -1,6 +1,6 @@ - name: Build a tarball args: - chdir: "src/{{ zuul.project.canonical_name }}" + chdir: "{{ zuul_work_dir }}" shell: | #!/bin/bash -xe diff --git a/roles/run-wheel/defaults/main.yaml b/roles/run-wheel/defaults/main.yaml index c6897080a..014e98cfe 100644 --- a/roles/run-wheel/defaults/main.yaml +++ b/roles/run-wheel/defaults/main.yaml @@ -1,2 +1,3 @@ --- tox_environment: venv +zuul_work_dir: "src/{{ zuul.project.canonical_name }}" diff --git a/roles/run-wheel/tasks/main.yaml b/roles/run-wheel/tasks/main.yaml index 73afb2659..d7ffdee88 100644 --- a/roles/run-wheel/tasks/main.yaml +++ b/roles/run-wheel/tasks/main.yaml @@ -1,6 +1,6 @@ - name: Build a wheel args: - chdir: "src/{{ zuul.project.canonical_name }}" + chdir: "{{ zuul_work_dir }}" shell: | #!/bin/bash -xe diff --git a/roles/test-setup/defaults/main.yaml b/roles/test-setup/defaults/main.yaml new file mode 100644 index 000000000..a0afa22c5 --- /dev/null +++ b/roles/test-setup/defaults/main.yaml @@ -0,0 +1,2 @@ +--- +zuul_work_dir: "src/{{ zuul.project.canonical_name }}" diff --git a/roles/test-setup/tasks/main.yaml b/roles/test-setup/tasks/main.yaml index 36a86843b..0fa552008 100644 --- a/roles/test-setup/tasks/main.yaml +++ b/roles/test-setup/tasks/main.yaml @@ -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 diff --git a/roles/tox/defaults/main.yaml b/roles/tox/defaults/main.yaml index c6897080a..014e98cfe 100644 --- a/roles/tox/defaults/main.yaml +++ b/roles/tox/defaults/main.yaml @@ -1,2 +1,3 @@ --- tox_environment: venv +zuul_work_dir: "src/{{ zuul.project.canonical_name }}" diff --git a/roles/tox/tasks/main.yaml b/roles/tox/tasks/main.yaml index bc4f4326c..f065fd2a0 100644 --- a/roles/tox/tasks/main.yaml +++ b/roles/tox/tasks/main.yaml @@ -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