|
20 | 20 | when: |
21 | 21 | - quay_release_result is defined |
22 | 22 | - quay_release_result.stdout is defined |
23 | | - - quay_release_result.stdout != "" |
| 23 | + - quay_release_result.stdout|length > 0 |
24 | 24 | - quay_release_result.stdout != "null" |
25 | 25 |
|
26 | 26 | - name: "Set quay release to the incremented one if exists" |
|
29 | 29 | when: |
30 | 30 | - quay_increment_release_result is defined |
31 | 31 | - quay_increment_release_result.stdout is defined |
32 | | - - quay_increment_release_result.stdout != "" |
| 32 | + - quay_increment_release_result.stdout|length > 0 |
33 | 33 |
|
34 | 34 | - name: "Append the -test suffix to the packageName" |
35 | 35 | shell: "{{ yq_bin_path }} w -i {{ package_path }} 'packageName' '{{ package_name }}-test'" |
|
112 | 112 | shell: "{{ oc_bin_path }} create -f {{ operator_work_dir }}/../scorecard.secret.yaml" |
113 | 113 | environment: |
114 | 114 | KUBECONFIG: "{{ kubeconfig_path }}" |
115 | | - when: scorecard_secret_result.stat.exists == True |
| 115 | + when: scorecard_secret_result.stat.exists |
116 | 116 |
|
117 | 117 | - name: "Create the subscription" |
118 | 118 | shell: "{{ oc_bin_path }} create -f {{ olm_operator_files_path }}/subscription.yml" |
|
141 | 141 | content: "{{ csv_describe_result.stdout }}" |
142 | 142 | dest: "{{ work_dir }}/olm-operator-csv-debug.txt" |
143 | 143 | mode: 0644 |
144 | | - when: csv_describe_result.stdout != "" |
| 144 | + when: csv_describe_result.stdout|length > 0 |
145 | 145 |
|
146 | 146 | - name: "Get the pod status of the deployed operator" |
147 | 147 | shell: > |
|
151 | 151 | ignore_errors: true |
152 | 152 | environment: |
153 | 153 | KUBECONFIG: "{{ kubeconfig_path }}" |
154 | | - when: csv_describe_result.stdout != "" |
| 154 | + when: csv_describe_result.stdout|length > 0 |
155 | 155 |
|
156 | 156 | - name: "Output the operator pod log to a debug file" |
157 | 157 | copy: |
158 | 158 | content: "{{ operator_pod_result.stdout }}" |
159 | 159 | dest: "{{ work_dir }}/olm-operator-pod-debug.txt" |
160 | 160 | mode: 0644 |
161 | 161 | when: |
162 | | - - csv_describe_result.stdout != "" |
163 | | - - operator_pod_result.stdout != "" |
| 162 | + - csv_describe_result.stdout|length > 0 |
| 163 | + - operator_pod_result.stdout|length > 0 |
164 | 164 |
|
165 | 165 | - name: "Get the pod container logs of the deployed operator" |
166 | 166 | shell: > |
|
170 | 170 | ignore_errors: true |
171 | 171 | environment: |
172 | 172 | KUBECONFIG: "{{ kubeconfig_path }}" |
173 | | - when: csv_describe_result.stdout != "" |
| 173 | + when: csv_describe_result.stdout|length > 0 |
174 | 174 |
|
175 | 175 | - name: "Output the operator container log to a debug file" |
176 | 176 | copy: |
177 | 177 | content: "{{ operator_container_result.stdout }}" |
178 | 178 | dest: "{{ work_dir }}/olm-operator-container-debug.txt" |
179 | 179 | mode: 0644 |
180 | 180 | when: |
181 | | - - csv_describe_result.stdout != "" |
182 | | - - operator_container_result.stdout != "" |
| 181 | + - csv_describe_result.stdout|length > 0 |
| 182 | + - operator_container_result.stdout|length > 0 |
183 | 183 |
|
184 | 184 | - name: "Get the catalogsource pod log" |
185 | 185 | shell: > |
|
233 | 233 | - name: "Get replicaset logs for operators that failed olm-deployment output" |
234 | 234 | shell: > |
235 | 235 | "{{ oc_bin_path }} get replicasets -o |
236 | | - go-template={%raw%}'{{range .items}}{{.status.conditions}}{{\"\\n\"}}{{end}}'{%endraw%} |
| 236 | + go-template={%raw%}'{{ range .items }}{{ .status.conditions }}{{ \"\\n\" }}{{ end }}'{%endraw%} |
237 | 237 | -n {{ openshift_namespace }}" |
238 | 238 | register: olm_replicaset_output |
239 | 239 | environment: |
|
0 commit comments