Merge "Create tox_environment_defaults variable for tox based jobs"
This commit is contained in:
commit
94cd547fea
@ -1,3 +1,5 @@
|
||||
---
|
||||
tox_envlist: venv
|
||||
zuul_work_dir: "src/{{ zuul.project.canonical_name }}"
|
||||
tox_environment: {}
|
||||
tox_environment_defaults: {}
|
||||
|
@ -3,11 +3,15 @@
|
||||
msg: "tox_envlist is required for this role"
|
||||
when: tox_envlist is not defined
|
||||
|
||||
- name: Create my_tox_environment variable
|
||||
set_fact:
|
||||
my_tox_environment: "{{ tox_environment_defaults | combine(tox_environment) }}"
|
||||
|
||||
- name: Run tox
|
||||
args:
|
||||
chdir: "{{ zuul_work_dir }}"
|
||||
executable: /bin/bash
|
||||
environment: "{{ tox_environment | default(omit) }}"
|
||||
environment: "{{ my_tox_environment }}"
|
||||
shell: |
|
||||
# If a bundle file is present, call tox with the jenkins version of
|
||||
# the test environment so it is used. Otherwise, use the normal
|
||||
|
@ -44,19 +44,24 @@
|
||||
This performs basic host and general project setup tasks common
|
||||
to all tox unit test jobs.
|
||||
|
||||
Responds to three variables:
|
||||
Responds to these variables:
|
||||
|
||||
tox_envlist
|
||||
work against specified environments (ALL selects all)
|
||||
|
||||
tox_environment
|
||||
list of environmental variables to pass to bash shell
|
||||
list of user defined environmental variables to pass to bash shell
|
||||
|
||||
tox_command_line
|
||||
an optional command line
|
||||
run: playbooks/tox/run
|
||||
pre-run: playbooks/tox/pre
|
||||
post-run: playbooks/tox/post
|
||||
vars:
|
||||
tox_environment_defaults:
|
||||
NOSE_WITH_HTML_OUTPUT: 1
|
||||
NOSE_HTML_OUT_FILE: nose_results.html
|
||||
NOSE_WITH_XUNIT: 1
|
||||
|
||||
- job:
|
||||
name: tox-py27
|
||||
|
Loading…
x
Reference in New Issue
Block a user