File tree 1 file changed +37
-0
lines changed
1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 101
101
ansible.builtin.debug :
102
102
msg : " Do not fail when preflight check container throws an error"
103
103
always :
104
+ - name : Get image digest
105
+ ansible.builtin.shell : >
106
+ set -eo pipefail;
107
+ skopeo inspect
108
+ {% if partner_creds | length %}
109
+ --authfile {{ partner_creds }}
110
+ {% else %}
111
+ --no-creds
112
+ {% endif %}
113
+ docker://{{ current_operator_image }} | jq -r '.Digest'
114
+ register : sha
115
+ retries : 2
116
+ delay : 30
117
+ until : sha is succeeded
118
+
119
+ - name : Debug image digest
120
+ ansible.builtin.debug :
121
+ msg : " {{ sha.stdout }}"
122
+
123
+ - name : " Pull cert grade of {{ current_operator_image }}"
124
+ vars :
125
+ filter_params : " filter=docker_image_digest%3D%3D{{ sha.stdout }}"
126
+ ansible.builtin.uri :
127
+ url : >
128
+ {{ catalog_url }}/images?{{ filter_params }}&page_size=100&page=0
129
+ method : GET
130
+ headers :
131
+ X-API-KEY : " {{ PYXIS_API_TOKEN }}"
132
+ status_code : 200
133
+ timeout : 120
134
+ register : pyxis_grade_status
135
+
136
+ - name : " Test_ Preflight: Get cert grade of {{ current_operator_image }}"
137
+ debug :
138
+ msg : " {{ pyxis_grade_status.json.data[0].freshness_grades[0].grade }}"
139
+ when : pyxis_grade_status is defined
140
+
104
141
- name : Unset pyxis auth to not reuse by following containers
105
142
ansible.builtin.set_fact :
106
143
cert_project_id : " "
You can’t perform that action at this time.
0 commit comments