Skip to content

Commit 8d908cf

Browse files
committed
Add steps to save and tag docker images for use by preflight checks
1 parent f164607 commit 8d908cf

File tree

3 files changed

+72
-3
lines changed

3 files changed

+72
-3
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,3 +193,27 @@ jobs:
193193
with:
194194
sarif_file: ${{ steps.scan.outputs.sarif }}
195195
category: build-${{ inputs.image }}
196+
197+
- name: Save NGINX OSS image as tarball
198+
if: ${{ inputs.image == 'nginx' }}
199+
run: |
200+
docker save -o nginx-oss-image.tar localhost:5000/nginx-gateway-fabric/nginx:${{ github.run_id }}-${{ github.run_number }}
201+
202+
- name: Upload NGINX OSS image artifact
203+
if: ${{ inputs.image == 'nginx' }}
204+
uses: actions/upload-artifact@v4
205+
with:
206+
name: nginx-oss-image
207+
path: nginx-oss-image.tar
208+
209+
- name: Save Operator image as tarball
210+
if: ${{ inputs.image == 'operator' }}
211+
run: |
212+
docker save -o operator-image.tar localhost:5000/nginx-gateway-fabric/operator:${{ github.run_id }}-${{ github.run_number }}
213+
214+
- name: Upload Operator image artifact
215+
if: ${{ inputs.image == 'operator' }}
216+
uses: actions/upload-artifact@v4
217+
with:
218+
name: operator-image
219+
path: operator-image.tar

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,15 @@ jobs:
271271
path: ${{ github.workspace }}/dist
272272
key: nginx-gateway-fabric-${{ github.run_id }}-${{ github.run_number }}
273273

274+
- name: Save NGINX Gateway Fabric image
275+
run: docker save -o ngf-image.tar localhost:5000/nginx/nginx-gateway-fabric:${{ github.run_id }}-${{ github.run_number }}
276+
277+
- name: Upload NGINX Gateway Fabric image artifact
278+
uses: actions/upload-artifact@v4
279+
with:
280+
name: ngf-image
281+
path: ngf-image.tar
282+
274283
assertion:
275284
name: Generate and Sign Assertion Documents
276285
needs: [vars, binary]

.github/workflows/openshift-certification.yml

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,56 @@ jobs:
2828
chmod +x preflight-linux-amd64
2929
sudo mv preflight-linux-amd64 /usr/local/bin/preflight
3030
31+
- name: Download NGINX Gateway Fabric image artifact
32+
uses: actions/download-artifact@v4
33+
with:
34+
name: ngf-image
35+
36+
- name: Load NGINX Gateway Fabric image into Docker
37+
run: docker load -i ngf-image.tar
38+
39+
- name: Tag image for preflight
40+
run: |
41+
docker tag localhost:5000/nginx/nginx-gateway-fabric:${{ github.run_id }}-${{ github.run_number }} nginx-gateway-fabric:edge-ubi
42+
3143
- name: Run preflight for NGINX Gateway Fabric
3244
env:
3345
PYXIS_API_TOKEN: ${{ secrets.PYXIS_API_TOKEN }}
34-
run: preflight check container ghcr.io/nginx/nginx-gateway-fabric:edge-ubi > ngf-preflight-result.json
46+
run: preflight check container nginx-gateway-fabric:edge-ubi > ngf-preflight-result.json
47+
48+
- name: Download NGINX NGINX OSS image artifact
49+
uses: actions/download-artifact@v4
50+
with:
51+
name: nginx-oss-image
52+
53+
- name: Load NGINX OSS image into Docker
54+
run: docker load -i nginx-oss-image.tar
55+
56+
- name: Tag image for preflight
57+
run: |
58+
docker tag localhost:5000/nginx-gateway-fabric/nginx:${{ github.run_id }}-${{ github.run_number }}nginx-oss:edge-ubi
3559
3660
- name: Run preflight for NGINX OSS
3761
env:
3862
PYXIS_API_TOKEN: ${{ secrets.PYXIS_API_TOKEN }}
39-
run: preflight check container ghcr.io/nginx/nginx-gateway-fabric/nginx:edge-ubi > ngf-oss-preflight-result.json
63+
run: preflight check container nginx:edge-ubi > ngf-oss-preflight-result.json
64+
65+
- name: Download NGINX Gateway Fabric Operator image artifact
66+
uses: actions/download-artifact@v4
67+
with:
68+
name: operator-image
69+
70+
- name: Load NGINX Gateway Fabric Operator image into Docker
71+
run: docker load -i operator-image.tar
72+
73+
- name: Tag image for preflight
74+
run: |
75+
docker tag localhost:5000/nginx-gateway-fabric/operator:${{ github.run_id }}-${{ github.run_number }} ngf-operator:edge
4076
4177
- name: Run preflight for NGINX Gateway Fabric Operator
4278
env:
4379
PYXIS_API_TOKEN: ${{ secrets.PYXIS_API_TOKEN }}
44-
run: preflight check container ghcr.io/nginx/nginx-gateway-fabric/operator:edge > ngf-operator-preflight-result.json
80+
run: preflight check operator ngf-operator:edge > ngf-operator-preflight-result.json
4581

4682
- name: Aggregate preflight results and fail if any checks failed
4783
run: |

0 commit comments

Comments
 (0)