Skip to content

Commit 7037153

Browse files
Bugfix for extract-operator-bundle.yml bundle sanity checks causing syntax errors
1 parent d511884 commit 7037153

File tree

2 files changed

+7
-18
lines changed

2 files changed

+7
-18
lines changed

roles/parse_operator_bundle/tasks/bundle_sanity_checks.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,17 @@
2626
- name: "Check if the operators.operatorframework.io.bundle.channels.v1 from annotation.yaml matches the bundle image label"
2727
fail:
2828
msg: "The operators.operators.operatorframework.io.bundle.channels.v1 value in the annotations yaml doesn't match the corresponding bundle image label!"
29-
when: >
30-
- annotations_vars.annotations['operators.operatorframework.io.bundle.channels.v1']
31-
!= skopeo_inspect_json.Labels['operators.operatorframework.io.bundle.channels.v1']
29+
when: annotations_vars.annotations['operators.operatorframework.io.bundle.channels.v1'] != skopeo_inspect_json.Labels['operators.operatorframework.io.bundle.channels.v1']
3230

3331
- name: "Check if the operators.operatorframework.io.bundle.manifests.v1 from annotation.yaml matches the bundle image label"
3432
fail:
3533
msg: "The operators.operators.operatorframework.io.bundle.manifests.v1 value in the annotations yaml doesn't match the corresponding bundle image label!"
36-
when: >
37-
- annotations_vars.annotations['operators.operatorframework.io.bundle.manifests.v1']
38-
!= skopeo_inspect_json.Labels['operators.operatorframework.io.bundle.manifests.v1']
34+
when: annotations_vars.annotations['operators.operatorframework.io.bundle.manifests.v1'] != skopeo_inspect_json.Labels['operators.operatorframework.io.bundle.manifests.v1']
3935

4036
- name: "Check if the operators.operatorframework.io.bundle.mediatype.v1 from annotation.yaml matches the bundle image label"
4137
fail:
4238
msg: "The operators.operatorframework.io.bundle.mediatype.v1 value in the annotations yaml doesn't match the corresponding bundle image label!"
43-
when: >
44-
- annotations_vars.annotations['operators.operatorframework.io.bundle.mediatype.v1']
45-
!= skopeo_inspect_json.Labels['operators.operatorframework.io.bundle.mediatype.v1']
39+
when: annotations_vars.annotations['operators.operatorframework.io.bundle.mediatype.v1'] != skopeo_inspect_json.Labels['operators.operatorframework.io.bundle.mediatype.v1']
4640

4741
- name: "Check if the operators.operatorframework.io.bundle.mediatype.v1 is set to the expected value"
4842
fail:
@@ -53,13 +47,9 @@
5347
- name: "Check if the operators.operatorframework.io.bundle.metadata.v1 from annotation.yaml matches the bundle image label"
5448
fail:
5549
msg: "The operators.operatorframework.io.bundle.metadata.v1 value in the annotations yaml doesn't match the corresponding bundle image label!!"
56-
when: >
57-
- annotations_vars.annotations['operators.operatorframework.io.bundle.metadata.v1']
58-
!= skopeo_inspect_json.Labels['operators.operatorframework.io.bundle.metadata.v1']
50+
when: annotations_vars.annotations['operators.operatorframework.io.bundle.metadata.v1'] != skopeo_inspect_json.Labels['operators.operatorframework.io.bundle.metadata.v1']
5951

6052
- name: "Check if the operators.operatorframework.io.bundle.package.v1 from annotation.yaml matches the bundle image label"
6153
fail:
6254
msg: "The operators.operatorframework.io.bundle.package.v1 value in the annotations yaml doesn't match the corresponding bundle image label!"
63-
when: >
64-
- annotations_vars.annotations['operators.operatorframework.io.bundle.package.v1']
65-
!= skopeo_inspect_json.Labels['operators.operatorframework.io.bundle.package.v1']
55+
when: annotations_vars.annotations['operators.operatorframework.io.bundle.package.v1'] != skopeo_inspect_json.Labels['operators.operatorframework.io.bundle.package.v1']

roles/parse_operator_bundle/tasks/main.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,8 @@
149149
mode: 0644
150150

151151
- name: "Sanity check the operator bundle's information"
152-
include_tasks: "bundle_sanity_checks.yml"
153-
when:
154-
bundle_sanity_checks|bool
152+
include_tasks: bundle_sanity_checks.yml
153+
when: bundle_sanity_checks|bool
155154

156155
rescue:
157156

0 commit comments

Comments
 (0)