Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
2121f3b
Add workflow to validate UBI images pass RedHat Certification
shaun-nx Oct 7, 2025
d61c9f4
Update args and fix pre-commit checks
shaun-nx Oct 7, 2025
2ffc89c
Add premissions and default run env
shaun-nx Oct 7, 2025
34d29e7
Ensure Openshift ceritfication runs outside of prod release
shaun-nx Oct 7, 2025
11cb2ec
Update dry_run input
shaun-nx Oct 7, 2025
c132f47
Ensure Openshift certification runs only on merges to main, and durin…
shaun-nx Oct 7, 2025
7597193
Potential fix for code scanning alert no. 542: If expression always true
shaun-nx Oct 7, 2025
9691208
tmp remove if check for certification job
shaun-nx Oct 7, 2025
bb8a349
Remove `--json` flag
shaun-nx Oct 7, 2025
f164607
Use check container instead of check operator
shaun-nx Oct 7, 2025
8d908cf
Add steps to save and tag docker images for use by preflight checks
shaun-nx Oct 7, 2025
afc676e
change operator to container
shaun-nx Oct 7, 2025
8ef4adb
Move image save and upload to build.yaml. Add debug echo for tags
shaun-nx Oct 8, 2025
118145b
Update openshift certification job with new image tags
shaun-nx Oct 8, 2025
aafd707
Fix pre-commit errors
shaun-nx Oct 8, 2025
893fdb1
Load images to Docker Daemon in build step. Run Openshift certificati…
shaun-nx Oct 8, 2025
60388bb
Merge branch 'main' into feat/pipeline-certfication-testing
shaun-nx Oct 8, 2025
9a16ec5
Add image to input
shaun-nx Oct 8, 2025
90f1618
Remove image version output
shaun-nx Oct 8, 2025
ff72dc3
Use docker buildx to ensure images for multi platforms are saved
shaun-nx Oct 8, 2025
ff3b959
Fix pre-commit errors
shaun-nx Oct 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,22 @@ jobs:
with:
sarif_file: ${{ steps.scan.outputs.sarif }}
category: build-${{ inputs.image }}

- name: Export and upload images for all platforms
run: |
# Remove spaces and split platforms by comma
platforms=$(echo "${{ inputs.platforms }}" | tr -d ' ' | tr ',' ' ')
for platform in $platforms; do
# Replace / with - for tarball name (e.g., linux/amd64 -> linux-amd64)
plat_tag=$(echo "$platform" | tr '/' '-')
# Create a local reference for the platform
docker buildx imagetools create --tag tempimg-$plat_tag ghcr.io/${{ github.repository_owner }}/nginx-gateway-fabric/${{ inputs.image }}:${{ steps.meta.outputs.version }} --platform $platform
# Export the image as a tarball
docker buildx imagetools export tempimg-$plat_tag > ${{ inputs.image }}-$plat_tag.tar
done

- name: Upload all image artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.image }}-images
path: ${{ inputs.image }}-*.tar
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,25 @@ jobs:
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]
platform: ["linux/amd64", "linux/arm64"]
# 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) }}
uses: ./.github/workflows/openshift-certification.yml
with:
runner: ubuntu-24.04
image: ${{ matrix.image }}
platform: ${{ matrix.platform }}
permissions:
contents: read
packages: read
secrets: inherit

functional-tests:
name: Functional tests
needs: [vars, build-oss, build-plus]
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/openshift-certification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: OpenShift Certification

on:
workflow_call:
inputs:
runner:
required: false
type: string
default: 'ubuntu-24.04'
image:
required: true
type: string
platform:
required: true
type: string

defaults:
run:
shell: bash

permissions:
contents: read

jobs:
preflight:
runs-on: ${{ inputs.runner }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- 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: Download image artifact
uses: actions/download-artifact@v4
with:
name: ${{ inputs.image }}-images # or ${{ inputs.image }}-linux-${{ inputs.platform | tr '/' '-' }}

- name: Load image into Docker
run: docker load -i ${{ inputs.image }}-${{ inputs.platform | tr '/' '-' }}.tar

Check failure on line 43 in .github/workflows/openshift-certification.yml

View workflow job for this annotation

GitHub Actions / Actionlint

[actionlint] reported by reviewdog 🐶 got unexpected character ' ' while lexing || operator, expecting '|' [expression] Raw Output: e:.github/workflows/openshift-certification.yml:43:68: got unexpected character ' ' while lexing || operator, expecting '|' [expression]

- name: Retag image for preflight
run: |

Check failure on line 46 in .github/workflows/openshift-certification.yml

View workflow job for this annotation

GitHub Actions / Actionlint

[actionlint] reported by reviewdog 🐶 property "image_version" is not defined in object type {image: string; platform: string; runner: string} [expression] Raw Output: e:.github/workflows/openshift-certification.yml:46:108: property "image_version" is not defined in object type {image: string; platform: string; runner: string} [expression]
loaded_tag="ghcr.io/${{ github.repository_owner }}/nginx-gateway-fabric/${{ inputs.image }}:${{ inputs.image_version }}"
preflight_tag="${{ inputs.image }}:ubi"
docker tag "$loaded_tag" "$preflight_tag"

- name: Run preflight
env:
PYXIS_API_TOKEN: ${{ secrets.PYXIS_API_TOKEN }}
run: preflight check container ${{ inputs.image }}:ubi > preflight-result.json

- name: Check preflight results
run: |
failed_count=$(jq '.results.failed | length' preflight-result.json)
if [ "$failed_count" -ne 0 ]; then
echo "Preflight checks failed: $failed_count failed checks"
echo "Results for preflight-result.json:"
jq '.results.failed' preflight-result.json
exit 1
fi