diff --git a/zuul.d/playbooks/pre-osa-aio.yml b/zuul.d/playbooks/pre-osa-aio.yml index 965325d1b3..5500cb5467 100644 --- a/zuul.d/playbooks/pre-osa-aio.yml +++ b/zuul.d/playbooks/pre-osa-aio.yml @@ -40,7 +40,9 @@ ZUUL_SRC_PATH: "{{ (action != 'shastest') | ternary(_zuul_src_path, '') }}" ANSIBLE_PACKAGE: "{{ ansible_package | default('') }}" SETUP_ARA: 'true' - when: "'upgrade' not in action" + when: + - "'upgrade' not in action" + - osa_pre_run_bootstrap | default(True) - name: Run bootstrap-aio script become: yes become_user: root @@ -59,3 +61,4 @@ - "'upgrade' not in action" - action != 'linters' - action != 'shastest' + - osa_pre_run_bootstrap | default(True) diff --git a/zuul.d/playbooks/run.yml b/zuul.d/playbooks/run.yml index 3562e61bd9..04ac1964b1 100644 --- a/zuul.d/playbooks/run.yml +++ b/zuul.d/playbooks/run.yml @@ -13,12 +13,19 @@ args: chdir: "src/opendev.org/openstack/openstack-ansible" executable: /bin/bash - environment: - # NOTE(logan): ARA is already installed in the gate environment by the - # pre-osa-aio pre-run playbook - SETUP_ARA: false - # NOTE(logan): The project is bootstrapped in the pre playbook so the - # bootstrapping can be skipped here - SKIP_OSA_RUNTIME_VENV_BUILD: 1 - SKIP_OSA_BOOTSTRAP_AIO: 1 - SKIP_OSA_ROLE_CLONE: 1 + vars: + skip_bootstrap: + # NOTE(logan): ARA is already installed in the gate environment by the + # pre-osa-aio pre-run playbook + SETUP_ARA: False + # NOTE(logan): The project is bootstrapped in the pre playbook so the + # bootstrapping can be skipped here + SKIP_OSA_RUNTIME_VENV_BUILD: 1 + SKIP_OSA_BOOTSTRAP_AIO: 1 + SKIP_OSA_ROLE_CLONE: 1 + run_bootstrap: + # NOTE(jrosser) + # ZUUL_SRC_PATH is needed for bootstrap-ansible inside gate-check-commit.sh + # when pre playbook bootstrap is disabled + ZUUL_SRC_PATH: "{{ ansible_user_dir }}/src" + environment: "{{ (osa_pre_run_bootstrap | default(True)) | ternary(skip_bootstrap, run_bootstrap) }}"