diff --git a/playbooks/roles/ironic-install/tasks/ironicclient_source_install.yml b/playbooks/roles/ironic-install/tasks/ironicclient_source_install.yml index 16fe819e8..2b5d0b6df 100644 --- a/playbooks/roles/ironic-install/tasks/ironicclient_source_install.yml +++ b/playbooks/roles/ironic-install/tasks/ironicclient_source_install.yml @@ -23,6 +23,6 @@ command: git pull --ff-only chdir=/opt/stack/python-ironicclient - name: "python-ironicclient - Apply CI changes if necessary" script: parse_zuul_changes.py /opt/stack/python-ironicclient https://review.openstack.org openstack/python-ironicclient "{{ lookup('env', 'ZUUL_CHANGES') }}" - when: ci_testing == true + when: ci_testing_zuul_changes is defined - name: "python-ironicclient - Installing patched python-ironicclient library." command: pip install --force-reinstall /opt/stack/python-ironicclient diff --git a/playbooks/roles/ironic-install/tasks/main.yml b/playbooks/roles/ironic-install/tasks/main.yml index 8e83736bf..0f806919b 100644 --- a/playbooks/roles/ironic-install/tasks/main.yml +++ b/playbooks/roles/ironic-install/tasks/main.yml @@ -43,7 +43,7 @@ command: git pull --ff-only chdir=/opt/stack/ironic/ - name: "Ironic - Apply CI changes if necessary" script: parse_zuul_changes.py /opt/stack/ironic https://review.openstack.org openstack/ironic "{{ lookup('env', 'ZUUL_CHANGES') }}" - when: ci_testing == true + when: ci_testing_zuul_changes is defined - name: "Ironic Client - Install from source if configured to do so." include: ironicclient_source_install.yml when: skip_install is not defined and ((ironicclient_source_install is defined and ironicclient_source_install == true) or ci_testing == true) diff --git a/playbooks/roles/ironic-install/tasks/shade_source_install.yml b/playbooks/roles/ironic-install/tasks/shade_source_install.yml index c76d1e442..7b547b986 100644 --- a/playbooks/roles/ironic-install/tasks/shade_source_install.yml +++ b/playbooks/roles/ironic-install/tasks/shade_source_install.yml @@ -23,6 +23,6 @@ command: git pull --ff-only chdir=/opt/stack/shade - name: "Shade - Apply CI changes if necessary" script: parse_zuul_changes.py /opt/stack/shade https://review.openstack.org openstack-infra/shade "{{ lookup('env', 'ZUUL_CHANGES') }}" - when: ci_testing == true + when: ci_testing_zuul_changes is defined - name: "Shade - Installing patched shade library." command: pip install --force-reinstall /opt/stack/shade diff --git a/playbooks/test-bifrost-dynamic.yaml b/playbooks/test-bifrost-dynamic.yaml index 67b9ee726..7fe78edd6 100644 --- a/playbooks/test-bifrost-dynamic.yaml +++ b/playbooks/test-bifrost-dynamic.yaml @@ -12,9 +12,14 @@ sudo: yes gather_facts: yes pre_tasks: - - name: "Set ci_testing flag if a list of changes are found in the environment variables" + - name: "Set ci_testing_zuul if it appears we are running in upstream OpenStack CI" set_fact: ci_testing: true + ci_testing_zuul: true + when: lookup('env', 'ZUUL_BRANCH') != "" + - name: "Set ci_testing_zuul_changes if ZUUL_CHANGES is set" + set_fact: + ci_testing_zuul_changes: true when: lookup('env', 'ZUUL_CHANGES') != "" - name: "Set ci_testing_zuul if it appears we are running in upstream OpenStack CI" set_fact: @@ -30,6 +35,7 @@ shell: netstat -apn|grep LISTEN when: ci_testing_zuul is defined roles: + - role: bifrost-create-vm-nodes - role: ironic-install cleaning: false testing: true diff --git a/playbooks/test-bifrost.yaml b/playbooks/test-bifrost.yaml index 51b213aad..b2e07ccee 100644 --- a/playbooks/test-bifrost.yaml +++ b/playbooks/test-bifrost.yaml @@ -9,14 +9,15 @@ set_fact: baremetal_csv_file: "/tmp/baremetal.csv" when: baremetal_csv_file is not defined - - name: "Set ci_testing flag if a list of changes are found in the environment variables" - set_fact: - ci_testing: true - when: lookup('env', 'ZUUL_CHANGES') != "" - name: "Set ci_testing_zuul if it appears we are running in upstream OpenStack CI" set_fact: + ci_testing: true ci_testing_zuul: true - when: "'bare-trusty' in ansible_hostname" + when: lookup('env', 'ZUUL_BRANCH') != "" + - name: "Set ci_testing_zuul_changes if ZUUL_CHANGES is set" + set_fact: + ci_testing_zuul_changes: true + when: lookup('env', 'ZUUL_CHANGES') != "" - name: "Collect process list if running in OpenStack CI" command: ps aux when: ci_testing_zuul is defined