|
84 | 84 |
|
85 | 85 | - name: Override operator build output with pre-update index image for Phase 1 |
86 | 86 | ansible.builtin.set_fact: |
87 | | - cifmw_operator_build_output_pre_update: >- |
88 | | - {{ |
89 | | - { |
90 | | - 'cifmw_operator_build_output': { |
91 | | - 'operators': { |
92 | | - 'openstack-operator': { |
93 | | - 'image_catalog': cifmw_minor_update_pre_update_index_image |
94 | | - } |
95 | | - } |
96 | | - } |
97 | | - } |
98 | | - }} |
| 87 | + cifmw_operator_build_output: |
| 88 | + operators: |
| 89 | + openstack-operator: |
| 90 | + image_catalog: "{{ cifmw_minor_update_pre_update_index_image }}" |
99 | 91 |
|
100 | | - - name: Phase 1 - Deploy with pre-update index image using deploy-edpm.yml |
| 92 | + - name: Load parameters for direct execution |
101 | 93 | block: |
102 | | - - name: Write pre-update operator build output to temporary file |
103 | | - ansible.builtin.copy: |
104 | | - dest: "{{ ansible_user_dir }}/ci-framework-data/artifacts/operator_build_output_pre_update.yml" |
105 | | - content: "{{ cifmw_operator_build_output_pre_update | to_nice_yaml }}" |
106 | | - mode: "0644" |
| 94 | + - name: Load group vars |
| 95 | + block: |
| 96 | + - name: Read group vars file |
| 97 | + ansible.builtin.slurp: |
| 98 | + src: "{{ ansible_user_dir }}/src/github.com/openstack-k8s-operators/ci-framework/group_vars/all.yml" |
| 99 | + delegate_to: localhost |
| 100 | + register: _group_vars_content |
| 101 | + |
| 102 | + - name: Set group vars as facts |
| 103 | + when: "'content' in _group_vars_content" |
| 104 | + ansible.builtin.set_fact: |
| 105 | + "{{ item.key }}": "{{ item.value }}" |
| 106 | + cacheable: true |
| 107 | + loop: "{{ _group_vars_content['content'] | b64decode | from_yaml | dict2items }}" |
| 108 | + loop_control: |
| 109 | + loop_var: item |
| 110 | + |
| 111 | + - name: Load scenario files |
| 112 | + loop: |
| 113 | + - "{{ ansible_user_dir }}/src/github.com/openstack-k8s-operators/ci-framework/scenarios/centos-9/base.yml" |
| 114 | + - "{{ ansible_user_dir }}/src/github.com/openstack-k8s-operators/ci-framework/scenarios/centos-9/edpm_baremetal_deployment_ci.yml" |
| 115 | + loop_control: |
| 116 | + loop_var: scenario_file |
| 117 | + block: |
| 118 | + - name: Read scenario file |
| 119 | + ansible.builtin.slurp: |
| 120 | + src: "{{ scenario_file }}" |
| 121 | + delegate_to: localhost |
| 122 | + register: _scenario_file |
| 123 | + |
| 124 | + - name: Set scenario vars as facts |
| 125 | + when: "'content' in _scenario_file" |
| 126 | + ansible.builtin.set_fact: |
| 127 | + "{{ fact_item.key }}": "{{ fact_item.value }}" |
| 128 | + cacheable: true |
| 129 | + loop: "{{ _scenario_file['content'] | b64decode | from_yaml | dict2items }}" |
| 130 | + loop_control: |
| 131 | + loop_var: fact_item |
| 132 | + |
| 133 | + - name: Load edpm-ansible.yml if exists |
| 134 | + when: edpm_file.stat.exists |
| 135 | + block: |
| 136 | + - name: Read edpm-ansible.yml file |
| 137 | + ansible.builtin.slurp: |
| 138 | + src: "{{ ansible_user_dir }}/ci-framework-data/artifacts/edpm-ansible.yml" |
| 139 | + delegate_to: localhost |
| 140 | + register: _edpm_content |
| 141 | + |
| 142 | + - name: Set edpm vars as facts |
| 143 | + when: "'content' in _edpm_content" |
| 144 | + ansible.builtin.set_fact: |
| 145 | + "{{ item.key }}": "{{ item.value }}" |
| 146 | + cacheable: true |
| 147 | + loop: "{{ _edpm_content['content'] | b64decode | from_yaml | dict2items }}" |
| 148 | + loop_control: |
| 149 | + loop_var: item |
| 150 | + |
| 151 | + - name: Load all parameters from parameters directory |
| 152 | + vars: |
| 153 | + provided_dir: "{{ ansible_user_dir }}/ci-framework-data/artifacts/parameters" |
| 154 | + ansible.builtin.include_role: |
| 155 | + name: cifmw_helpers |
| 156 | + tasks_from: var_dir.yml |
| 157 | + apply: |
| 158 | + delegate_to: localhost |
| 159 | + become: false |
| 160 | + gather_facts: false |
| 161 | + |
| 162 | + - name: Set cifmw_prepare_openstackversion fact |
| 163 | + ansible.builtin.set_fact: |
| 164 | + cifmw_prepare_openstackversion: false |
107 | 165 |
|
108 | | - - name: Perform Podified and EDPM deployment on compute nodes with virtual baremetal (pre-update) |
109 | | - ansible.builtin.command: |
110 | | - chdir: "{{ ansible_user_dir }}/src/github.com/openstack-k8s-operators/ci-framework" |
111 | | - cmd: >- |
112 | | - ansible-playbook deploy-edpm.yml |
113 | | - -i "{{ ansible_user_dir }}/ci-framework-data/artifacts/zuul_inventory.yml" |
114 | | - -e @group_vars/all.yml |
115 | | - -e @scenarios/centos-9/base.yml |
116 | | - -e @scenarios/centos-9/edpm_baremetal_deployment_ci.yml |
117 | | - {%- if edpm_file.stat.exists %} |
118 | | - -e @{{ ansible_user_dir }}/ci-framework-data/artifacts/edpm-ansible.yml |
119 | | - {%- endif %} |
120 | | - {%- if cifmw_extras is defined %} |
121 | | - {%- for extra_var in cifmw_extras %} |
122 | | - -e "{{ extra_var }}" |
123 | | - {%- endfor %} |
124 | | - {%- endif %} |
125 | | - -e "@{{ ansible_user_dir }}/ci-framework-data/artifacts/parameters/zuul-params.yml" |
126 | | - -e "@{{ ansible_user_dir }}/ci-framework-data/artifacts/operator_build_output_pre_update.yml" |
127 | | - -e "cifmw_prepare_openstackversion=false" |
| 166 | +- name: Phase 1 - Deploy with pre-update index image using deploy-edpm.yml |
| 167 | + ansible.builtin.import_playbook: ../../../deploy-edpm.yml |
0 commit comments