diff --git a/playbooks/infra-prod/pre.yaml b/playbooks/infra-prod/pre.yaml index 9fffef1..01a85b1 100644 --- a/playbooks/infra-prod/pre.yaml +++ b/playbooks/infra-prod/pre.yaml @@ -43,3 +43,17 @@ - name: Synchronize src repos to workspace directory. include_role: name: prepare-workspace-git + + # When running from periodic/hourly we want to explicitly override + # to run from the tip of 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 + 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