Run manage-projects/base/bridge on system-config changes

We should run manage-projects when the manage-projects code on
system-config changes. To do that, we need to run the system-config
playbook so that the system-config content will be updated.

In order to that properly, we need to run base, which means we
need to run bridge. So we really want to do all three so that we're
doing the correct dependent sequence. Subsequent changes can
then just pick off single service playbooks and make them jobs
that depend on base.

Change-Id: I3560feff4309f6be21b72b30a7a6d61a60829e52
This commit is contained in:
Monty Taylor 2020-03-30 09:27:38 -05:00
parent 771e401001
commit c8af267282
2 changed files with 55 additions and 16 deletions

View File

@ -1433,6 +1433,40 @@
infra_prod_playbook_collect_log: false
ansible_forks: 50
- job:
name: infra-prod-update-system-config
parent: infra-prod-playbook
description: Clone system-config and install modules and roles
vars:
playbook_name: update-system-config.yaml
- job:
name: infra-prod-bridge
parent: infra-prod-playbook
description: Update the code on bridge
dependencies:
- infra-prod-update-system-config
vars:
playbook_name: bridge.yaml
files:
- playbooks/bridge.yaml
- playbooks/roles/pip3/.*
- playbooks/roles/install-ansible/.*
- playbooks/roles/root-keys/.*
- playbooks/host_vars/bridge.openstack.org.yaml
- playbooks/zuul/run-production-playbook.yaml
- job:
name: infra-prod-base
parent: infra-prod-playbook
description: Run the base playbook everywhere
dependencies:
- infra-prod-update-system-config
- name: infra-prod-bridge
soft: true
vars:
playbook_name: base.yaml
- job:
name: system-config-goaccess-report
description: |
@ -1761,6 +1795,23 @@
- system-config-promote-image-python-base-3.8
- system-config-promote-image-python-builder-3.7
- system-config-promote-image-python-builder-3.8
- infra-prod-update-system-config
- infra-prod-base
- infra-prod-bridge
- infra-prod-manage-projects:
files:
- playbooks/manage-projects.yaml
- playbooks/group_vars/gerrit.yaml
- playbooks/group_vars/gitea.yaml
- playbooks/host_vars/gitea.*
- playbooks/host_vars/review.*
- playbooks/roles/gitea-git-repos/.*
- playbooks/roles/gerrit/defaults/main.yaml
- playbooks/roles/gerrit/tasks/manage-projects.yaml
dependencies:
- name: system-config-promote-image-gerrit-2.13
soft: true
- name: infra-prod-update-system-config
periodic:
jobs:
- developer-openstack-goaccess-report
@ -1773,3 +1824,7 @@
- specs-openstack-goaccess-report
- tarballs-opendev-goaccess-report
- zuul-ci-goaccess-report
# Nightly runs of ansible things for catchup
- infra-prod-update-system-config
- infra-prod-base
- infra-prod-bridge

View File

@ -72,22 +72,6 @@ set +e
# Run all the ansible playbooks under timeout to prevent them from getting
# stuck if they are oomkilled
# Clone system-config and install modules and roles
start_timer
timeout -k 2m 10m ansible-playbook ${ANSIBLE_PLAYBOOKS}/update-system-config.yaml
send_timer update_system_config
# Update the code on bridge
start_timer
timeout -k 2m 10m ansible-playbook ${ANSIBLE_PLAYBOOKS}/bridge.yaml
send_timer bridge
# Run the base playbook everywhere
start_timer
timeout -k 2m 120m ansible-playbook -f 50 ${ANSIBLE_PLAYBOOKS}/base.yaml
send_timer base
# Service playbooks
start_timer
timeout -k 2m 30m ansible-playbook -f 50 ${ANSIBLE_PLAYBOOKS}/service-bridge.yaml