openstack-ansible/zuul.d/playbooks/run.yml

30 lines
985 B
YAML

- hosts: all
tasks:
- name: Set the Zuul sources path
set_fact:
zuul_src_path: "{{ ansible_user_dir }}/src"
- name: Set current test repo (cross-repo)
set_fact:
current_test_repo: "git.openstack.org/{{ osa_test_repo }}"
when:
- osa_test_repo is defined
- name: Set current test repo (non-cross-repo)
set_fact:
current_test_repo: "{{ zuul.project.canonical_name }}"
when:
- osa_test_repo is not defined
- name: Run gate-check-commit.sh script
become: yes
become_user: root
command: "scripts/gate-check-commit.sh {{ scenario }} {{ action }} {{ install_method }}"
args:
chdir: "src/{{ current_test_repo }}"
environment:
# ZUUL_SRC_PATH is used by tests/get-ansible-role-requirements to
# where the CI provided git sources were cloned.
ZUUL_SRC_PATH: "{{ zuul_src_path }}"
ANSIBLE_PACKAGE: "{{ ansible_package | default('') }}"