Skip to content

Commit d61c9f4

Browse files
committed
Update args and fix pre-commit checks
1 parent 2121f3b commit d61c9f4

File tree

2 files changed

+35
-46
lines changed

2 files changed

+35
-46
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -411,13 +411,10 @@ jobs:
411411

412412
openshift-certification:
413413
name: OpenShift Certification
414-
needs: [vars, build-oss, build-plus, build-operator]
414+
needs: [build-oss, build-plus, build-operator]
415415
if: ${{ inputs.is_production_release && (inputs.dry_run == false || inputs.dry_run == null) }}
416416
uses: ./.github/workflows/openshift-certification.yml
417417
with:
418-
operator-version: ${{ inputs.operator_version || '' }}
419-
build-os: "ubi"
420-
dry_run: ${{ inputs.dry_run || false }}
421418
runner: ${{ github.repository_owner == 'nginx' && (inputs.is_production_release || (github.event_name == 'push' && github.ref == 'refs/heads/main')) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }}
422419
permissions:
423420
contents: read

.github/workflows/openshift-certification.yml

Lines changed: 34 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@ name: OpenShift Certification
33
on:
44
workflow_call:
55
inputs:
6-
build-os:
7-
required: true
8-
type: string
9-
default: 'ubi'
10-
dry_run:
11-
required: false
12-
type: boolean
13-
default: false
146
runner:
157
required: false
168
type: string
@@ -20,42 +12,42 @@ jobs:
2012
preflight:
2113
runs-on: ${{ inputs.runner }}
2214
steps:
23-
- name: Checkout repository
24-
uses: actions/checkout@v4
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
2517

26-
- name: Download preflight binary
27-
run: |
28-
curl -LO https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/latest/download/preflight-linux-amd64
29-
chmod +x preflight-linux-amd64
30-
sudo mv preflight-linux-amd64 /usr/local/bin/preflight
18+
- name: Download preflight binary
19+
run: |
20+
curl -LO https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/latest/download/preflight-linux-amd64
21+
chmod +x preflight-linux-amd64
22+
sudo mv preflight-linux-amd64 /usr/local/bin/preflight
3123
32-
- name: Run preflight for NGINX Gateway Fabric
33-
env:
34-
PYXIS_API_TOKEN: ${{ secrets.PYXIS_API_TOKEN }}
35-
run: preflight check container ghcr.io/nginx/nginx-gateway-fabric:edge-ubi --json > ngf-preflight-result.json
24+
- name: Run preflight for NGINX Gateway Fabric
25+
env:
26+
PYXIS_API_TOKEN: ${{ secrets.PYXIS_API_TOKEN }}
27+
run: preflight check container ghcr.io/nginx/nginx-gateway-fabric:edge-ubi --json > ngf-preflight-result.json
3628

37-
- name: Run preflight for NGINX OSS
38-
env:
39-
PYXIS_API_TOKEN: ${{ secrets.PYXIS_API_TOKEN }}
40-
run: preflight check container ghcr.io/nginx/nginx-gateway-fabric/nginx:edge-ubi --json > ngf-oss-preflight-result.json
29+
- name: Run preflight for NGINX OSS
30+
env:
31+
PYXIS_API_TOKEN: ${{ secrets.PYXIS_API_TOKEN }}
32+
run: preflight check container ghcr.io/nginx/nginx-gateway-fabric/nginx:edge-ubi --json > ngf-oss-preflight-result.json
4133

42-
- name: Run preflight for NGINX Gateway Fabric Operator
43-
env:
44-
PYXIS_API_TOKEN: ${{ secrets.PYXIS_API_TOKEN }}
45-
run: preflight check operator ghcr.io/nginx/nginx-gateway-fabric/operator:edge --json > ngf-operator-preflight-result.json
34+
- name: Run preflight for NGINX Gateway Fabric Operator
35+
env:
36+
PYXIS_API_TOKEN: ${{ secrets.PYXIS_API_TOKEN }}
37+
run: preflight check operator ghcr.io/nginx/nginx-gateway-fabric/operator:edge --json > ngf-operator-preflight-result.json
4638

47-
- name: Aggregate preflight results and fail if any checks failed
48-
run: |
49-
total_failed=0
50-
for result in ngf-preflight-result.json ngf-oss-preflight-result.json ngf-operator-preflight-result.json; do
51-
failed_count=$(jq '.results.failed | length' "$result")
52-
total_failed=$((total_failed + failed_count))
53-
done
54-
if [ "$total_failed" -ne 0 ]; then
55-
echo "Preflight checks failed: $total_failed failed checks across all images"
56-
for result in ngf-preflight-result.json ngf-oss-preflight-result.json ngf-operator-preflight-result.json; do
57-
echo "Results for $result:"
58-
jq '.results.failed' "$result"
59-
done
60-
exit 1
61-
fi
39+
- name: Aggregate preflight results and fail if any checks failed
40+
run: |
41+
total_failed=0
42+
for result in ngf-preflight-result.json ngf-oss-preflight-result.json ngf-operator-preflight-result.json; do
43+
failed_count=$(jq '.results.failed | length' "$result")
44+
total_failed=$((total_failed + failed_count))
45+
done
46+
if [ "$total_failed" -ne 0 ]; then
47+
echo "Preflight checks failed: $total_failed failed checks across all images"
48+
for result in ngf-preflight-result.json ngf-oss-preflight-result.json ngf-operator-preflight-result.json; do
49+
echo "Results for $result:"
50+
jq '.results.failed' "$result"
51+
done
52+
exit 1
53+
fi

0 commit comments

Comments
 (0)