Revert "Update to tip of master in periodic jobs"

This reverts commit 32978fe729.

The update to the project-config code is moved into the dependent
change in base-jobs, alongside the same thing for system-config.
This way the workaround is in one place.

This also expands the notes in the project-config sync role to better
explain what it is doing.

Depends-On:  https://review.opendev.org/c/opendev/base-jobs/+/862853
Change-Id: I492c01159665e7e7c6684ad36d57388e55127861
This commit is contained in:
Ian Wienand 2022-10-28 14:53:17 +11:00
parent 730fcf0171
commit 5795119373
No known key found for this signature in database
3 changed files with 13 additions and 9 deletions

View File

@ -1 +1,14 @@
Sync project-config to remote host Sync project-config to remote host
This syncs the ``project-config`` repo checked out on the bastion host
(which is actually running the Ansible that runs this role) to the
current host. This repo holds configuration for some production hosts
and thus we want to make sure to deploy those services with the
checked-out tree Zuul has prepared for a given deploy-pipeline CD job
run (i.e. so we apply config updates in commit order).
Also see the `setup-src
<https://opendev.org/opendev/base-jobs/src/branch/master/playbooks/infra-prod/setup-src.yaml>`__
to see where this checkout is setup; there are some tricks -- for
example for hourly and periodic jobs we want to ensure we run from
master at the time the job runs, not at the time the job was enqueued.

View File

@ -1,3 +1,2 @@
project_config_dest: /opt/project-config project_config_dest: /opt/project-config
project_config_subdir: "" project_config_subdir: ""
infra_prod_run_from_master: "{{ zuul.pipeline|default('') in ['periodic', 'opendev-prod-hourly'] }}"

View File

@ -3,14 +3,6 @@
path: '{{ project_config_dest }}' path: '{{ project_config_dest }}'
state: directory state: directory
- name: Update from master on bastion host
when: infra_prod_run_from_master|bool
delegate_to: '{{ groups["bastion"][0] }}'
git:
repo: https://opendev.org/openstack/project-config
dest: '{{ project_config_src }}'
force: yes
- name: Sync project-config repo - name: Sync project-config repo
synchronize: synchronize:
src: '{{ project_config_src }}/{{ project_config_subdir }}' src: '{{ project_config_src }}/{{ project_config_subdir }}'