infra-prod: Move project-config reset into base-jobs
Currently we reset trees to master in two places; here and in sync-project-config (Ib999731fe132b1e9f197e51d74066fa75cb6c69b). This is a bit confusing, and requires delegating tasks to the bridge node which isn't great. Also, as we think about trying to make jobs run in parallel it's another place to get things wrong. This merges the update into one place. Change-Id: I6ffeb6e6562fb34db89f4e475da27b60e30f6fe7
This commit is contained in:
parent
e76a51f9cf
commit
f53b34c171
@ -24,16 +24,30 @@
|
||||
include_role:
|
||||
name: prepare-workspace-git
|
||||
|
||||
# When running from periodic/hourly we want to explicitly override
|
||||
# to run from the tip of master
|
||||
# The intent of the periodic jobs is to run with latest master. If
|
||||
# they get enqueued, then other patches land, they'll still run
|
||||
# with the value of the zuul ref from when they were
|
||||
# enqueued. That's not what we want for prod, as it can lead to
|
||||
# running or deploying old versions of config files. Reset them
|
||||
# to master.
|
||||
- name: Should we run from master
|
||||
set_fact:
|
||||
infra_prod_run_from_master: "{{ zuul.pipeline|default('') in ['periodic', 'opendev-prod-hourly'] }}"
|
||||
|
||||
- name: Update from master
|
||||
- name: Reset checkouts to master for periodic jobs
|
||||
when: infra_prod_run_from_master|bool
|
||||
git:
|
||||
repo: https://opendev.org/opendev/system-config
|
||||
dest: /home/zuul/src/opendev.org/opendev/system-config
|
||||
force: yes
|
||||
version: master
|
||||
block:
|
||||
- name: Update system-config from master
|
||||
git:
|
||||
repo: 'https://opendev.org/opendev/system-config'
|
||||
dest: '/home/zuul/src/opendev.org/opendev/system-config'
|
||||
force: yes
|
||||
version: 'master'
|
||||
|
||||
- name: Update project-config from master
|
||||
when: '"opendev.org/openstack/project-config" in zuul.projects'
|
||||
git:
|
||||
repo: 'https://opendev.org/openstack/project-config'
|
||||
dest: '/home/zuul/src/opendev.org/openstack/project-config'
|
||||
force: yes
|
||||
version: 'master'
|
||||
|
Loading…
x
Reference in New Issue
Block a user