-
Notifications
You must be signed in to change notification settings - Fork 137
Add workflow to validate UBI images pass RedHat Certification #4035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 70 commits
2121f3b
d61c9f4
2ffc89c
34d29e7
11cb2ec
c132f47
7597193
9691208
bb8a349
f164607
8d908cf
afc676e
8ef4adb
118145b
aafd707
893fdb1
60388bb
9a16ec5
90f1618
ff72dc3
ff3b959
e76b660
b9cf4aa
cb8d8f9
a9d3eb9
7d185bf
4fbeed6
6f9f14b
912a3ff
5064ef6
a219d77
afc4c36
e0b7b9a
fd02d12
ce3f4c6
f5adba0
9cbee53
d75ade3
4fad413
aeb55e6
decd459
0db0eff
8decbcb
83e216d
e45fb54
b75a370
887362e
113e43b
bd667db
109a18d
889ba70
c6838b2
ee1d63d
8f3cfc0
dad38c0
7354392
59857e6
a02fbe8
c7f2ab9
ed6878a
e1003bc
5a252d8
a2d4762
de68998
21ac62b
a351f50
bb98927
8abbf61
a6bc92f
695c5b6
5100b57
b7482df
2eb9464
42bdd4d
d451e1b
c49f43c
36b1430
fc1c94d
02fd063
bd33296
1ff669b
7a5d894
cf0dc37
ee43213
76e9317
9697b76
022c27a
1679346
da95856
ec40b25
3075830
2141280
abba4c0
edd64df
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -271,6 +271,12 @@ | |
path: ${{ github.workspace }}/dist | ||
key: nginx-gateway-fabric-${{ github.run_id }}-${{ github.run_number }} | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | ||
with: | ||
name: dist-${{ github.run_id }} | ||
path: ${{ github.workspace }}/dist | ||
|
||
assertion: | ||
name: Generate and Sign Assertion Documents | ||
needs: [vars, binary] | ||
|
@@ -409,6 +415,32 @@ | |
id-token: write # for docker/login to login to NGINX registry | ||
secrets: inherit | ||
|
||
openshift-certification: | ||
name: OpenShift Certification | ||
needs: [build-oss, build-plus, build-operator] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
image: [ngf, nginx, operator] | ||
# if: ${{ github.event_name == 'pull_request' && github.event_pull_request.base.ref == 'main' || (github.event_name == 'push' && github.ref == 'refs/heads/main') || (inputs.is_production_release == true) }} | ||
if: | | ||
Check failure on line 426 in .github/workflows/ci.yml
|
||
${{ matrix.image == 'operator' || ( | ||
Check failure on line 427 in .github/workflows/ci.yml
|
||
(matrix.image == 'ngf' || matrix.image == 'nginx') && | ||
contains( | ||
Check failure on line 429 in .github/workflows/ci.yml
|
||
(matrix.image == 'ngf' && needs.build-oss.outputs.image_version || matrix.image == 'nginx' && needs.build-oss.outputs.image_version), | ||
'-ubi' | ||
) | ||
) }} | ||
uses: ./.github/workflows/openshift-certification.yml | ||
Check failure on line 434 in .github/workflows/ci.yml
|
||
with: | ||
image: ${{ matrix.image }} | ||
tag: ${{ inputs.release_version || '' }} | ||
dry_run: ${{ inputs.dry_run || false }} | ||
permissions: | ||
contents: read | ||
packages: read | ||
secrets: inherit | ||
|
||
functional-tests: | ||
name: Functional tests | ||
needs: [vars, build-oss, build-plus] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: OpenShift Certification | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
image: | ||
required: true | ||
type: string | ||
image_version: | ||
required: true | ||
type: string | ||
tag: | ||
required: false | ||
type: string | ||
default: '' | ||
dry_run: | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
preflight: | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
with: | ||
ref: ${{ (inputs.tag != '' && !inputs.dry_run ) && format('refs/tags/v{0}', inputs.tag) || github.ref }} | ||
|
||
- name: Login to Quay.io | ||
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.QUAY_USERNAME }} | ||
password: ${{ secrets.QUAY_ROBOT_TOKEN }} | ||
shaun-nx marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
if: ${{ ! inputs.dry_run }} | ||
|
||
- name: Download preflight binary | ||
run: | | ||
curl -LO https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/latest/download/preflight-linux-amd64 | ||
chmod +x preflight-linux-amd64 | ||
sudo mv preflight-linux-amd64 /usr/local/bin/preflight | ||
|
||
- name: Run preflight | ||
env: | ||
PYXIS_API_TOKEN: ${{ secrets.PYXIS_API_TOKEN }} | ||
run: | | ||
if [[ "${{ inputs.image }}" == "ngf" ]]; then | ||
IMAGE_PATH="quay.io/${{ github.repository_owner }}/nginx-gateway-fabric:${{ inputs.image_version }}" | ||
else | ||
IMAGE_PATH="quay.io/${{ github.repository_owner }}/nginx-gateway-fabric/${{ inputs.image }}:${{ inputs.image_version }}" | ||
fi | ||
preflight check container "$IMAGE_PATH" > preflight-result.json | ||
|
||
- name: Check preflight results | ||
run: | | ||
failed_count=$(jq '.results.failed | length' preflight-result.json) | ||
if [ "$failed_count" -ne 0 ]; then | ||
shaun-nx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
echo "Preflight checks failed: $failed_count failed checks" | ||
echo "Results for preflight-result.json:" | ||
jq '.results.failed' preflight-result.json | ||
exit 1 | ||
fi |
Uh oh!
There was an error while loading. Please reload this page.