From 5795119373086301ab856eff59547956cc699f3a Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Fri, 28 Oct 2022 14:53:17 +1100 Subject: [PATCH] Revert "Update to tip of master in periodic jobs" This reverts commit 32978fe72961515b634986b6ea723177858180f3. 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 --- playbooks/roles/sync-project-config/README.rst | 13 +++++++++++++ .../roles/sync-project-config/defaults/main.yaml | 1 - playbooks/roles/sync-project-config/tasks/main.yaml | 8 -------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/playbooks/roles/sync-project-config/README.rst b/playbooks/roles/sync-project-config/README.rst index f30e2ad8cd..39752d794f 100644 --- a/playbooks/roles/sync-project-config/README.rst +++ b/playbooks/roles/sync-project-config/README.rst @@ -1 +1,14 @@ 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 +`__ +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. diff --git a/playbooks/roles/sync-project-config/defaults/main.yaml b/playbooks/roles/sync-project-config/defaults/main.yaml index e17024ad67..1dad7599f7 100644 --- a/playbooks/roles/sync-project-config/defaults/main.yaml +++ b/playbooks/roles/sync-project-config/defaults/main.yaml @@ -1,3 +1,2 @@ project_config_dest: /opt/project-config project_config_subdir: "" -infra_prod_run_from_master: "{{ zuul.pipeline|default('') in ['periodic', 'opendev-prod-hourly'] }}" diff --git a/playbooks/roles/sync-project-config/tasks/main.yaml b/playbooks/roles/sync-project-config/tasks/main.yaml index e9119969c2..8c54d4989e 100644 --- a/playbooks/roles/sync-project-config/tasks/main.yaml +++ b/playbooks/roles/sync-project-config/tasks/main.yaml @@ -3,14 +3,6 @@ path: '{{ project_config_dest }}' 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 synchronize: src: '{{ project_config_src }}/{{ project_config_subdir }}'