Enable ARA cross-repo testing
When executing tests in OpenStack-CI, this patch enables the use of 'Depends-On: <change-id>' in the commit message to execute the test using a patch that is still in review for the openstack/ara repository. This patch also lays the ground for similar testing to be done with other openstack repositories, but that will no work just yet as it will take quite a bit more machinery to make the cloned repositories be used to build the repo. That work will be submitted in a subsequent patch. Change-Id: Id946883fa14cd692fb7c6a0f24865b0239b7250c
This commit is contained in:
parent
8a4729de24
commit
37e78b692c
@ -103,7 +103,13 @@ source "$(dirname "${0}")/bootstrap-ansible.sh"
|
||||
|
||||
# Install ARA and add it to the callback path provided by bootstrap-ansible.sh/openstack-ansible.rc
|
||||
# This is added *here* instead of bootstrap-ansible so it's used for CI purposes only.
|
||||
/opt/ansible-runtime/bin/pip install ara
|
||||
if [[ -d "/tmp/openstack/ara" ]]; then
|
||||
# This installs from a git checkout
|
||||
/opt/ansible-runtime/bin/pip install /tmp/openstack/ara
|
||||
else
|
||||
# This installs from pypi
|
||||
/opt/ansible-runtime/bin/pip install ara
|
||||
fi
|
||||
export ANSIBLE_CALLBACK_PLUGINS="/etc/ansible/roles/plugins/callback:/opt/ansible-runtime/lib/python2.7/site-packages/ara/plugins/callbacks"
|
||||
|
||||
# Log some data about the instance and the rest of the system
|
||||
|
@ -53,10 +53,21 @@
|
||||
{%- set filtered_role_list = [] %}
|
||||
{%- for role in roles %}
|
||||
{%- if role.src | match(".*git.openstack.org.*") %}
|
||||
{%- set _ = filtered_role_list.append(role) %}
|
||||
{%- set role_src_cleaned = role.src | regex_replace('https://git.openstack.org/', '') %}
|
||||
{%- set _ = filtered_role_list.append(role_src_cleaned) %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{{- filtered_role_list -}}
|
||||
openstack_repo_list: >
|
||||
{%- set filtered_repo_list = [] %}
|
||||
{%- set repo_list = lookup('env', 'ZUUL_CHANGES').split('^') %}
|
||||
{%- for repo in repo_list %}
|
||||
{%- set repo_cleaned = repo | regex_replace(':.*$', '') %}
|
||||
{%- if not repo_cleaned | match("^openstack/openstack-ansible.*") %}
|
||||
{%- set _ = filtered_repo_list.append(repo_cleaned) %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{{- filtered_repo_list -}}
|
||||
when:
|
||||
- _zuul_cloner_check.rc == 0
|
||||
|
||||
@ -84,6 +95,8 @@
|
||||
dest: '{{ role_path_default }}/openstack-ansible-security'
|
||||
- name: 'openstack/openstack-ansible-(?!security)(.*)'
|
||||
dest: '{{ role_path_default }}/\1'
|
||||
- name: 'openstack/(?!openstack-ansible)(.*)'
|
||||
dest: '/tmp/openstack/\1'
|
||||
dest: "/tmp/zuul-clonemap.yml"
|
||||
when:
|
||||
- _zuul_cloner_check.rc == 0
|
||||
@ -94,8 +107,8 @@
|
||||
-m /tmp/zuul-clonemap.yml \
|
||||
--cache-dir /opt/git \
|
||||
git://git.openstack.org \
|
||||
{% for role in zuul_roles %}
|
||||
{{ role.src | regex_replace('https://git.openstack.org/', '') }} \
|
||||
{% for repo in zuul_roles + openstack_repo_list %}
|
||||
{{ repo }} \
|
||||
{% endfor %}
|
||||
when:
|
||||
- _zuul_cloner_check.rc == 0
|
||||
|
Loading…
Reference in New Issue
Block a user