From 9258e5b6d826846bc4bcfce079662a565d64471e Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Fri, 14 Jul 2017 09:23:20 -0400 Subject: [PATCH] Update to tox_envlist variable Rename tox_environment to tox_envlist to better map with tox --help documentation. This also allows the following patch to support shell environmental variables. Change-Id: I2fb4e1c167ef93ad2948f2d328beff5e39ac52b7 Signed-off-by: Paul Belanger --- playbooks/tox/linters.yaml | 4 ++-- roles/run-tarball/defaults/main.yaml | 2 +- roles/run-tarball/tasks/main.yaml | 2 +- roles/run-wheel/defaults/main.yaml | 2 +- roles/run-wheel/tasks/main.yaml | 2 +- roles/tox/defaults/main.yaml | 2 +- roles/tox/tasks/main.yaml | 2 +- zuul.yaml | 16 ++++++++-------- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/playbooks/tox/linters.yaml b/playbooks/tox/linters.yaml index ce3ca1104..6effdd0a2 100644 --- a/playbooks/tox/linters.yaml +++ b/playbooks/tox/linters.yaml @@ -5,10 +5,10 @@ chdir: "src/{{ zuul.project.canonical_name }}" register: envlist - set_fact: - tox_environment: 'pep8' + tox_envlist: 'pep8' when: envlist.stdout.find('pep8') != -1 - set_fact: - tox_environment: 'linters' + tox_envlist: 'linters' when: envlist.stdout.find('linters') != -1 roles: - tox diff --git a/roles/run-tarball/defaults/main.yaml b/roles/run-tarball/defaults/main.yaml index 014e98cfe..7a8e44269 100644 --- a/roles/run-tarball/defaults/main.yaml +++ b/roles/run-tarball/defaults/main.yaml @@ -1,3 +1,3 @@ --- -tox_environment: venv +tox_envlist: 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 26ea6c0d0..8de8d2ba5 100644 --- a/roles/run-tarball/tasks/main.yaml +++ b/roles/run-tarball/tasks/main.yaml @@ -18,7 +18,7 @@ # License for the specific language governing permissions and limitations # under the License. - venv={{ tox_environment }} + venv={{ tox_envlist }} export UPPER_CONSTRAINTS_FILE=$(pwd)/upper-constraints.txt diff --git a/roles/run-wheel/defaults/main.yaml b/roles/run-wheel/defaults/main.yaml index 014e98cfe..7a8e44269 100644 --- a/roles/run-wheel/defaults/main.yaml +++ b/roles/run-wheel/defaults/main.yaml @@ -1,3 +1,3 @@ --- -tox_environment: venv +tox_envlist: 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 d7ffdee88..3a651cd39 100644 --- a/roles/run-wheel/tasks/main.yaml +++ b/roles/run-wheel/tasks/main.yaml @@ -18,7 +18,7 @@ # License for the specific language governing permissions and limitations # under the License. - venv={{ tox_environment }} + venv={{ tox_envlist }} export UPPER_CONSTRAINTS_FILE=$(pwd)/upper-constraints.txt diff --git a/roles/tox/defaults/main.yaml b/roles/tox/defaults/main.yaml index 014e98cfe..7a8e44269 100644 --- a/roles/tox/defaults/main.yaml +++ b/roles/tox/defaults/main.yaml @@ -1,3 +1,3 @@ --- -tox_environment: venv +tox_envlist: venv zuul_work_dir: "src/{{ zuul.project.canonical_name }}" diff --git a/roles/tox/tasks/main.yaml b/roles/tox/tasks/main.yaml index f065fd2a0..fbe5da7d9 100644 --- a/roles/tox/tasks/main.yaml +++ b/roles/tox/tasks/main.yaml @@ -9,7 +9,7 @@ # resulting environment at the end so that we have a record of exactly # what packages we ended up testing. - venv={{ tox_environment }} + venv={{ tox_envlist }} if [[ -z "$venv" ]]; then echo "Usage: $?" diff --git a/zuul.yaml b/zuul.yaml index 386fcff1e..39f5632a2 100644 --- a/zuul.yaml +++ b/zuul.yaml @@ -22,8 +22,8 @@ Responds to two variables: - tox_environment - the environment to pass on the command line + tox_envlist + work against specified environments (ALL selects all) tox_command_line an optional command line @@ -39,7 +39,7 @@ Uses tox with the "py27" environment. vars: - tox_environment: py27 + tox_envlist: py27 - job: name: tox-py34 @@ -49,7 +49,7 @@ Uses tox with the "py34" environment. vars: - tox_environment: py34 + tox_envlist: py34 - job: name: tox-py35 @@ -59,7 +59,7 @@ Uses tox with the "py35" environment. vars: - tox_environment: py35 + tox_envlist: py35 - job: name: tox-docs @@ -72,7 +72,7 @@ Uses tox with the "docs" environment. vars: - tox_environment: docs + tox_envlist: docs post-run: playbooks/tox/docs-post - job: @@ -93,7 +93,7 @@ Uses tox with the "cover" environment. vars: - tox_environment: cover + tox_envlist: cover - job: name: tox-tarball @@ -104,7 +104,7 @@ Uses tox with the "venv" environment. vars: - tox_environment: venv + tox_envlist: venv run: playbooks/tox/tarball post-run: playbooks/tox/tarball-post