Merge "Use configured upper-constraints for non-master Tempest run"

This commit is contained in:
Zuul 2021-03-11 14:27:04 +00:00 committed by Gerrit Code Review
commit da590bbd2f
2 changed files with 14 additions and 0 deletions

View File

@ -6,3 +6,6 @@ tempest_test_timeout: ''
stable_constraints_file: "{{ devstack_base_dir }}/requirements/upper-constraints.txt"
target_branch: "{{ zuul.branch }}"
tempest_tox_environment: {}
# NOTE(gmann): external_bridge_mtu shows as undefined for run-tempest role
# defining default value here to avoid that error.
external_bridge_mtu: 0

View File

@ -31,6 +31,17 @@
tempest_tox_environment: "{{ tempest_tox_environment | combine({'UPPER_CONSTRAINTS_FILE': stable_constraints_file}) | combine({'TOX_CONSTRAINTS_FILE': stable_constraints_file}) }}"
when: target_branch in ["stable/ocata", "stable/pike", "stable/queens", "stable/rocky", "stable/stein"]
- name: Use Configured upper-constraints for non-master Tempest
set_fact:
# TOX_CONSTRAINTS_FILE is new name, UPPER_CONSTRAINTS_FILE is old one, best to set both
tempest_tox_environment: "{{ tempest_tox_environment | combine({'UPPER_CONSTRAINTS_FILE': devstack_localrc['TEMPEST_VENV_UPPER_CONSTRAINTS']}) | combine({'TOX_CONSTRAINTS_FILE': devstack_localrc['TEMPEST_VENV_UPPER_CONSTRAINTS']}) }}"
when:
- devstack_localrc is defined
- "'TEMPEST_BRANCH' in devstack_localrc"
- "'TEMPEST_VENV_UPPER_CONSTRAINTS' in devstack_localrc"
- devstack_localrc['TEMPEST_BRANCH'] != 'master'
- devstack_localrc['TEMPEST_VENV_UPPER_CONSTRAINTS'] != 'default'
- name: Set OS_TEST_TIMEOUT if requested
set_fact:
tempest_tox_environment: "{{ tempest_tox_environment | combine({'OS_TEST_TIMEOUT': tempest_test_timeout}) }}"