diff --git a/roles/tox/README.rst b/roles/tox/README.rst index 45f8a3daa..cf1921e80 100644 --- a/roles/tox/README.rst +++ b/roles/tox/README.rst @@ -21,9 +21,9 @@ Runs tox for a project String of extra command line options to pass to tox. -.. zuul:rolevar:: tox_upper_constraints_file +.. zuul:rolevar:: tox_constraints_file - Path to an upper constraints file. Will be provided to tox via + Path to a pip constraints file. Will be provided to tox via UPPER_CONSTRAINTS_FILE environment variable if it exists. .. zuul:rolevar:: zuul_work_dir diff --git a/roles/tox/tasks/main.yaml b/roles/tox/tasks/main.yaml index edb8acc4a..6154c4a63 100644 --- a/roles/tox/tasks/main.yaml +++ b/roles/tox/tasks/main.yaml @@ -5,21 +5,21 @@ - name: Check to see if the constraints file exists stat: - path: "{{ tox_upper_constraints_file }}" + path: "{{ tox_constraints_file|default('missing') }}" get_checksum: false get_mime: false get_md5: false register: stat_results - when: tox_upper_constraints_file is defined + when: tox_constraints_file is defined - name: Record file location set_fact: - tox_upper_constraints_env: - UPPER_CONSTRAINTS_FILE: "{{ tox_upper_constraints_file }}" + tox_constraints_env: + UPPER_CONSTRAINTS_FILE: "{{ tox_constraints_file }}" when: not stat_results|skipped and stat_results.stat.exists - name: Run tox args: chdir: "{{ zuul_work_dir }}" - environment: "{{ tox_environment|combine(tox_upper_constraints_env|default({})) }}" + environment: "{{ tox_environment|combine(tox_constraints_env|default({})) }}" command: "{{ tox_executable }} -e{{ tox_envlist }} {{ tox_extra_args }}" diff --git a/zuul.yaml b/zuul.yaml index fbea82b7c..b7a76ef13 100644 --- a/zuul.yaml +++ b/zuul.yaml @@ -35,9 +35,9 @@ String containing extra arguments to append to the tox command line. - .. zuul:jobvar: tox_upper_constraints_file + .. zuul:jobvar: tox_constraints_file - Path to an upper constraints file. Will be provided to tox via + Path to a pip constraints file. Will be provided to tox in the UPPER_CONSTRAINTS_FILE environment variable if it exists. run: playbooks/tox/run pre-run: playbooks/tox/pre