b2befeb2b4
In the tox job it's nice to see what it is that we're gonna run. It's in the json file, but that's a little bit hidden. Change-Id: Iebe4b4c67d00ebc21be9038e06f1ee09badb4eb1
30 lines
896 B
YAML
30 lines
896 B
YAML
- name: Require tox_envlist variable
|
|
fail:
|
|
msg: tox_envlist is required for this role
|
|
when: tox_envlist is not defined
|
|
|
|
- name: Check to see if the constraints file exists
|
|
stat:
|
|
path: "{{ tox_constraints_file|default('missing') }}"
|
|
get_checksum: false
|
|
get_mime: false
|
|
get_md5: false
|
|
register: stat_results
|
|
when: tox_constraints_file is defined
|
|
|
|
- name: Record file location
|
|
set_fact:
|
|
tox_constraints_env:
|
|
UPPER_CONSTRAINTS_FILE: "{{ tox_constraints_file }}"
|
|
when: not stat_results|skipped and stat_results.stat.exists
|
|
|
|
- name: Emit tox command
|
|
debug:
|
|
msg: "Running tox: {{ tox_executable }} -e{{ tox_envlist }} {{ tox_extra_args }}"
|
|
|
|
- name: Run tox
|
|
args:
|
|
chdir: "{{ zuul_work_dir }}"
|
|
environment: "{{ tox_environment|combine(tox_constraints_env|default({})) }}"
|
|
command: "{{ tox_executable }} -e{{ tox_envlist }} {{ tox_extra_args }}"
|