Rename tox_upper_constraints_file to tox_constraints_file

Make the new variable default to the old variable for backwards compat.

Change-Id: I75d5e576276d68bfa23006d7ad4c2a86cb7f5050
This commit is contained in:
Monty Taylor 2017-09-10 14:13:41 -06:00
parent 4e9d9f8353
commit bc18b5478b
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
3 changed files with 9 additions and 9 deletions

View File

@ -21,9 +21,9 @@ Runs tox for a project
String of extra command line options to pass to tox. 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. UPPER_CONSTRAINTS_FILE environment variable if it exists.
.. zuul:rolevar:: zuul_work_dir .. zuul:rolevar:: zuul_work_dir

View File

@ -5,21 +5,21 @@
- name: Check to see if the constraints file exists - name: Check to see if the constraints file exists
stat: stat:
path: "{{ tox_upper_constraints_file }}" path: "{{ tox_constraints_file|default('missing') }}"
get_checksum: false get_checksum: false
get_mime: false get_mime: false
get_md5: false get_md5: false
register: stat_results register: stat_results
when: tox_upper_constraints_file is defined when: tox_constraints_file is defined
- name: Record file location - name: Record file location
set_fact: set_fact:
tox_upper_constraints_env: tox_constraints_env:
UPPER_CONSTRAINTS_FILE: "{{ tox_upper_constraints_file }}" UPPER_CONSTRAINTS_FILE: "{{ tox_constraints_file }}"
when: not stat_results|skipped and stat_results.stat.exists when: not stat_results|skipped and stat_results.stat.exists
- name: Run tox - name: Run tox
args: args:
chdir: "{{ zuul_work_dir }}" 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 }}" command: "{{ tox_executable }} -e{{ tox_envlist }} {{ tox_extra_args }}"

View File

@ -35,9 +35,9 @@
String containing extra arguments to append to the tox command line. 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. UPPER_CONSTRAINTS_FILE environment variable if it exists.
run: playbooks/tox/run run: playbooks/tox/run
pre-run: playbooks/tox/pre pre-run: playbooks/tox/pre