Skip to content

Commit 92039ad

Browse files
authored
Certify UBI images for Redhat catalog (#7011)
1 parent 28a81c5 commit 92039ad

File tree

6 files changed

+61
-4
lines changed

6 files changed

+61
-4
lines changed

.github/actions/certify-openshift-image/action.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ inputs:
1818
platforms:
1919
description: A comma separated list of architectures in the image manifest to certify
2020
required: false
21-
default: ""
21+
default: "amd64,arm64,ppc64le,s390x"
22+
submit:
23+
description: Submit results to Redhat PYAXIS
24+
required: false
25+
default: true
2226

2327
outputs:
2428
result:
@@ -43,14 +47,14 @@ runs:
4347
IFS=',' read -ra arch_list <<< "${{ inputs.platforms }}"
4448
for arch in "${arch_list[@]}"; do
4549
architecture=("${arch#*/}")
46-
./preflight check container ${{ inputs.image }} --pyxis-api-token ${{ inputs.pyxis_token }} --certification-project-id ${{ inputs.project_id }} --platform $architecture --submit
50+
./preflight check container ${{ inputs.image }} --pyxis-api-token ${{ inputs.pyxis_token }} --certification-project-id ${{ inputs.project_id }} --platform $architecture ${{ inputs.submit && '--submit' || '' }}
4751
if [ $? -ne 0 ]; then
4852
result=1
4953
fi
5054
done
5155
else
5256
# no platforms passed, this is either a manifest or a single platform image
53-
./preflight check container ${{ inputs.image }} --pyxis-api-token ${{ inputs.pyxis_token }} --certification-project-id ${{ inputs.project_id }} --submit
57+
./preflight check container ${{ inputs.image }} --pyxis-api-token ${{ inputs.pyxis_token }} --certification-project-id ${{ inputs.project_id }} ${{ inputs.submit && '--submit' || '' }}
5458
result=$?
5559
fi
5660
echo "result=$result" >> $GITHUB_OUTPUT

.github/scripts/exclude_ci_files.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
.github/workflows/build-ubi-dependency.yml
1919
.github/workflows/build-single-image.yml
2020
.github/workflows/cache-update.yml
21+
.github/workflows/certify-ubi-image.yml
2122
.github/workflows/cherry-pick.yml
2223
.github/workflows/codeql-analysis.yml
2324
.github/workflows/create-release-branch.yml
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Certify UBI image
2+
run-name: Certify UBI image ${{ inputs.image }} by @${{ github.actor }}
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
image:
8+
description: "Image to certify"
9+
required: true
10+
type: string
11+
submit:
12+
description: "Submit results to Redhat"
13+
required: false
14+
type: boolean
15+
default: false
16+
preflight_version:
17+
description: "Preflight version to use"
18+
required: false
19+
type: string
20+
default: "1.11.1"
21+
platforms:
22+
description: A comma separated list of architectures in the image manifest to certify
23+
required: false
24+
default: "amd64,arm64,ppc64le,s390x"
25+
26+
defaults:
27+
run:
28+
shell: bash
29+
30+
permissions:
31+
contents: read
32+
33+
jobs:
34+
certify-ubi-images:
35+
name: Certify OpenShift UBI images
36+
runs-on: ubuntu-24.04
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
40+
41+
- name: Certify UBI OSS images in quay
42+
uses: ./.github/actions/certify-openshift-image
43+
with:
44+
image: ${{ inputs.image }}
45+
project_id: ${{ secrets.CERTIFICATION_PROJECT_ID }}
46+
pyxis_token: ${{ secrets.PYXIS_API_TOKEN }}
47+
preflight_version: ${{ inputs.preflight_version }}
48+
submit: ${{ inputs.submit || true }}
49+
platforms: ${{ inputs.platforms }}

.github/workflows/image-promotion.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ jobs:
381381
image: quay.io/nginx/nginx-ingress:edge-ubi
382382
project_id: ${{ secrets.CERTIFICATION_PROJECT_ID }}
383383
pyxis_token: ${{ secrets.PYXIS_API_TOKEN }}
384+
preflight_version: 1.11.1
384385

385386
scan-docker-oss:
386387
name: Scan ${{ matrix.image }}-${{ matrix.target }}

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ jobs:
301301
image: quay.io/nginx/nginx-ingress:${{ inputs.nic_version }}-ubi
302302
project_id: ${{ secrets.CERTIFICATION_PROJECT_ID }}
303303
pyxis_token: ${{ secrets.PYXIS_API_TOKEN }}
304+
preflight_version: 1.11.1
304305

305306
operator:
306307
if: ${{ ! cancelled() && ! failure() && ! inputs.dry_run && ! contains(inputs.skip_step, 'operator') && !contains(inputs.skip_step, 'publish-helm-chart') }}

.github/workflows/update-docker-images.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,5 @@ jobs:
184184
project_id: ${{ secrets.CERTIFICATION_PROJECT_ID }}
185185
pyxis_token: ${{ secrets.PYXIS_API_TOKEN }}
186186
platforms: ""
187-
if: ${{ ! inputs.dry_run || false }}
187+
preflight_version: 1.11.1
188+
submit: ${{ ! inputs.dry_run || true }}

0 commit comments

Comments
 (0)