Browse Source

Use multiple run playbooks for windmill jobs

This breaks out the specific things we need to do for testing, into
their own playbook runs.

Change-Id: I50964b393bc4c5977d7f59e9c4bac48c1ea405ac
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
changes/65/640665/1
Paul Belanger 3 years ago
parent
commit
6efea7a8c1
  1. 5
      .zuul.d/jobs.yaml
  2. 7
      tests/playbooks/run-post.yaml
  3. 7
      tests/playbooks/run-pre.yaml
  4. 10
      tests/playbooks/run.yaml

5
.zuul.d/jobs.yaml

@ -3,7 +3,10 @@
name: windmill-base
parent: unittests
pre-run: tests/playbooks/pre.yaml
run: tests/playbooks/run.yaml
run:
- tests/playbooks/run-pre.yaml
- tests/playbooks/run.yaml
- tests/playbooks/run-post.yaml
post-run: tests/playbooks/post.yaml
required-projects:
- openstack/ansible-role-ansible

7
tests/playbooks/run-post.yaml

@ -0,0 +1,7 @@
---
- hosts: all
tasks:
- name: Run ansible-playbook for prove.yaml
args:
chdir: "{{ windmill_src_dir }}"
shell: "tox -evenv -- ansible-playbook -i {{ ansible_user_dir }}/{{ windmill_src_dir }}/inventory/testing/hosts playbooks/prove.yaml"

7
tests/playbooks/run-pre.yaml

@ -0,0 +1,7 @@
---
- hosts: all
tasks:
- name: Setup SSH host keys for ansible
args:
chdir: "{{ windmill_src_dir }}"
shell: "tox -evenv -- ansible-playbook -i {{ ansible_user_dir }}/{{ windmill_src_dir }}/inventory/testing/hosts tests/playbooks/bastion/site.yaml"

10
tests/playbooks/run.yaml

@ -1,11 +1,6 @@
---
- hosts: all
tasks:
- name: Setup SSH host keys for ansible
args:
chdir: "{{ windmill_src_dir }}"
shell: "tox -evenv -- ansible-playbook -i {{ ansible_user_dir }}/{{ windmill_src_dir }}/inventory/testing/hosts tests/playbooks/bastion/site.yaml"
- name: Bootstrap all nodes using windmill-ops
args:
chdir: "{{ zuul.projects['git.openstack.org/openstack/windmill-ops'].src_dir }}"
@ -15,8 +10,3 @@
args:
chdir: "{{ windmill_src_dir }}"
shell: "tox -evenv -- ansible-playbook -v -f1 -i {{ ansible_user_dir }}/{{ windmill_src_dir }}/inventory/testing/hosts playbooks/site.yaml -e @{{ windmill_extra_vars_file }}"
- name: Run ansible-playbook for prove.yaml
args:
chdir: "{{ windmill_src_dir }}"
shell: "tox -evenv -- ansible-playbook -i {{ ansible_user_dir }}/{{ windmill_src_dir }}/inventory/testing/hosts playbooks/prove.yaml"

Loading…
Cancel
Save