|
118 | 118 | )
|
119 | 119 | }}
|
120 | 120 |
|
| 121 | + - name: Update existing CRDs |
| 122 | + when: cifmw_test_operator_version is defined |
| 123 | + block: |
| 124 | + - name: Delete CRDs created by test-operator |
| 125 | + kubernetes.core.k8s: |
| 126 | + kubeconfig: "{{ cifmw_openshift_kubeconfig }}" |
| 127 | + api_key: "{{ cifmw_openshift_token | default(omit)}}" |
| 128 | + context: "{{ cifmw_openshift_context | default(omit)}}" |
| 129 | + kind: CustomResourceDefinition |
| 130 | + state: absent |
| 131 | + api_version: v1 |
| 132 | + name: "{{ item }}" |
| 133 | + namespace: "{{ cifmw_test_operator_namespace }}" |
| 134 | + wait: true |
| 135 | + wait_timeout: 600 |
| 136 | + loop: |
| 137 | + - "{{ cifmw_test_operator_tempest_crd_name }}" |
| 138 | + - "{{ cifmw_test_operator_tobiko_crd_name }}" |
| 139 | + - "{{ cifmw_test_operator_ansibletest_crd_name }}" |
| 140 | + - "{{ cifmw_test_operator_horizontest_crd_name }}" |
| 141 | + |
| 142 | + - name: Clone test-operator repository and checkout into specified version |
| 143 | + ansible.builtin.git: |
| 144 | + repo: "https://github.com/openstack-k8s-operators/test-operator.git" |
| 145 | + dest: /tmp/test-operator |
| 146 | + refspec: '+refs/pull/*:refs/heads/*' |
| 147 | + version: "{{ cifmw_test_operator_version }}" |
| 148 | + force: true |
| 149 | + |
| 150 | + - name: Run make generate manifests install from /tmp/test-operator dir |
| 151 | + environment: |
| 152 | + KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}" |
| 153 | + PATH: "{{ cifmw_path | default(ansible_env.PATH) }}" |
| 154 | + ansible.builtin.shell: >- |
| 155 | + set -o pipefail; |
| 156 | + make generate manifests install |
| 157 | + args: |
| 158 | + chdir: /tmp/test-operator |
| 159 | + |
121 | 160 | - name: Call test stages loop
|
122 | 161 | when: not cifmw_test_operator_dry_run | bool
|
123 | 162 | ansible.builtin.include_tasks: stages.yml
|
|
0 commit comments