Skip to content

Commit 08b8a2d

Browse files
committed
build released binary/images & helm chart on new runners
1 parent d0803de commit 08b8a2d

File tree

7 files changed

+28
-77
lines changed

7 files changed

+28
-77
lines changed

.github/actionlint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ self-hosted-runner:
22
# Labels of self-hosted runner in array of strings.
33
labels:
44
- kic-plus
5+
- ubuntu-24.04-amd64
56
# Configuration variables in array of strings defined in your repository or
67
# organization. `null` means disabling configuration variables check.
78
# Empty array means no configuration variable is allowed.

.github/workflows/build-oss.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ on:
3131
ic-version:
3232
required: false
3333
type: string
34+
runner:
35+
type: string
36+
default: ubuntu-24.04
3437

3538
defaults:
3639
run:
@@ -41,7 +44,7 @@ permissions:
4144

4245
jobs:
4346
build:
44-
runs-on: ubuntu-24.04
47+
runs-on: ${{ inputs.runner }}
4548
permissions:
4649
contents: read # for docker/build-push-action to read repo content
4750
id-token: write # for OIDC login to GCR
@@ -183,15 +186,6 @@ jobs:
183186
mkdir -p "${{ inputs.image }}-results/"
184187
if: ${{ inputs.authenticated && steps.build-push.conclusion == 'success' }}
185188

186-
# - name: Run Trivy vulnerability scanner
187-
# uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 # 0.24.0
188-
# with:
189-
# image-ref: ${{ steps.meta.outputs.tags }}
190-
# format: "sarif"
191-
# output: "${{ inputs.image }}-results/trivy.sarif"
192-
# ignore-unfixed: "true"
193-
# if: ${{ inputs.authenticated && steps.build-push.conclusion == 'success' }}
194-
195189
- name: DockerHub Login for Docker Scout
196190
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
197191
with:

.github/workflows/build-plus.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ on:
3737
ic-version:
3838
required: false
3939
type: string
40+
runner:
41+
type: string
42+
default: ubuntu-24.04
4043

4144
defaults:
4245
run:
@@ -51,7 +54,7 @@ jobs:
5154
contents: read # for docker/build-push-action to read repo content
5255
id-token: write # for OIDC login to AWS
5356
pull-requests: write # for scout report
54-
runs-on: ubuntu-24.04
57+
runs-on: ${{ inputs.runner }}
5558
steps:
5659
- name: Checkout Repository
5760
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -199,15 +202,6 @@ jobs:
199202
mkdir -p "${{ inputs.image }}-results/"
200203
if: ${{ inputs.authenticated && steps.build-push.conclusion == 'success' }}
201204

202-
# - name: Run Trivy vulnerability scanner
203-
# uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 # 0.24.0
204-
# with:
205-
# image-ref: ${{ steps.meta.outputs.tags }}
206-
# format: "sarif"
207-
# output: "${{ inputs.image }}-results/trivy.sarif"
208-
# ignore-unfixed: "true"
209-
# if: ${{ inputs.authenticated && steps.build-push.conclusion == 'success' }}
210-
211205
- name: DockerHub Login for Docker Scout
212206
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
213207
with:

.github/workflows/image-promotion.yml

Lines changed: 8 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,11 @@ jobs:
3737
go_path: ${{ steps.vars.outputs.go_path }}
3838
go_code_md5: ${{ steps.vars.outputs.go_code_md5 }}
3939
go_proxy: ${{ steps.vars.outputs.go_proxy }}
40-
binary_cache_hit: ${{ steps.binary-cache.outputs.cache-hit }}
4140
chart_version: ${{ steps.vars.outputs.chart_version }}
4241
ic_version: ${{ steps.vars.outputs.ic_version }}
4342
docker_md5: ${{ steps.vars.outputs.docker_md5 }}
4443
build_tag: ${{ steps.vars.outputs.build_tag }}
4544
stable_tag: ${{ steps.vars.outputs.stable_tag }}
46-
stable_image_exists: ${{ steps.stable_exists.outputs.exists }}
4745
image_matrix_oss: ${{ steps.vars.outputs.image_matrix_oss }}
4846
image_matrix_plus: ${{ steps.vars.outputs.image_matrix_plus }}
4947
image_matrix_nap: ${{ steps.vars.outputs.image_matrix_nap }}
@@ -74,14 +72,6 @@ jobs:
7472
echo "image_matrix_nap=$(cat .github/data/matrix-images-nap.json | jq -c)" >> $GITHUB_OUTPUT
7573
REF=${{ github.ref_name }} ./.github/scripts/variables.sh additional_tag >> $GITHUB_OUTPUT
7674
77-
- name: Fetch Cached Binary Artifacts
78-
id: binary-cache
79-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
80-
with:
81-
path: ${{ github.workspace }}/dist
82-
key: nginx-ingress-${{ steps.vars.outputs.go_code_md5 }}
83-
lookup-only: true
84-
8575
- name: Authenticate to Google Cloud
8676
id: auth
8777
uses: google-github-actions/auth@b7593ed2efd1c1617e1b0254da33b86225adb2a5 # v2.1.12
@@ -97,25 +87,16 @@ jobs:
9787
username: oauth2accesstoken
9888
password: ${{ steps.auth.outputs.access_token }}
9989

100-
- name: Check if stable image exists
101-
id: stable_exists
102-
run: |
103-
if docker pull gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:${{ steps.vars.outputs.stable_tag }}; then
104-
echo "exists=true" >> $GITHUB_OUTPUT
105-
fi
106-
10790
- name: Output variables
10891
run: |
10992
echo go_code_md5: ${{ steps.vars.outputs.go_code_md5 }}
11093
echo go_path: ${{ steps.vars.outputs.go_path }}
11194
echo go_proxy: ${{ steps.vars.outputs.go_proxy }}
112-
echo binary_cache_hit: ${{ steps.binary-cache.outputs.cache-hit }}
11395
echo chart_version: ${{ steps.vars.outputs.chart_version }}
11496
echo ic_version: ${{ steps.vars.outputs.ic_version }}
11597
echo docker_md5: ${{ steps.vars.outputs.docker_md5 }}
11698
echo build_tag: ${{ steps.vars.outputs.build_tag }}
11799
echo stable_tag: ${{ steps.vars.outputs.stable_tag }}
118-
echo stable_image_exists: ${{ steps.stable_exists.outputs.exists }}
119100
120101
govulncheck:
121102
name: Run govulncheck
@@ -167,7 +148,7 @@ jobs:
167148

168149
binaries:
169150
name: Build Binaries
170-
runs-on: ubuntu-24.04
151+
runs-on: ubuntu-24.04-amd64
171152
needs: [checks]
172153
permissions:
173154
contents: read
@@ -179,7 +160,6 @@ jobs:
179160
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
180161
with:
181162
go-version-file: go.mod
182-
if: ${{ needs.checks.outputs.binary_cache_hit != 'true' }}
183163

184164
- name: Setup netrc
185165
run: |
@@ -189,7 +169,6 @@ jobs:
189169
password ${{ secrets.ARTIFACTORY_TOKEN }}
190170
EOF
191171
chmod 600 $HOME/.netrc
192-
if: ${{ needs.checks.outputs.binary_cache_hit != 'true' }}
193172
194173
- name: Build binaries
195174
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
@@ -209,17 +188,14 @@ jobs:
209188
AWS_NAP_WAF_DOS_PRODUCT_CODE: ${{ secrets.AWS_NAP_WAF_DOS_PRODUCT_CODE }}
210189
AWS_NAP_WAF_DOS_PUB_KEY: ${{ secrets.AWS_NAP_WAF_DOS_PUB_KEY }}
211190
GORELEASER_CURRENT_TAG: "v${{ needs.checks.outputs.ic_version }}"
212-
if: ${{ needs.checks.outputs.binary_cache_hit != 'true' }}
213191

214192
- name: Store Artifacts in Cache
215193
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
216194
with:
217195
path: ${{ github.workspace }}/dist
218196
key: nginx-ingress-${{ needs.checks.outputs.go_code_md5 }}
219-
if: ${{ needs.checks.outputs.binary_cache_hit != 'true' }}
220197

221198
build-docker:
222-
if: ${{ needs.checks.outputs.stable_image_exists != 'true' }}
223199
name: Build Docker OSS
224200
needs: [checks, binaries]
225201
strategy:
@@ -235,6 +211,8 @@ jobs:
235211
tag: ${{ needs.checks.outputs.build_tag }}
236212
branch: ${{ github.ref }}
237213
ic-version: ${{ needs.checks.outputs.ic_version }}
214+
full-build: true
215+
runner: "ubuntu-24.04-amd64"
238216
permissions:
239217
contents: read
240218
actions: read
@@ -245,7 +223,6 @@ jobs:
245223
secrets: inherit
246224

247225
build-docker-plus:
248-
if: ${{ needs.checks.outputs.stable_image_exists != 'true' }}
249226
name: Build Docker Plus
250227
needs: [checks, binaries]
251228
strategy:
@@ -262,6 +239,8 @@ jobs:
262239
tag: ${{ needs.checks.outputs.build_tag }}
263240
branch: ${{ github.ref }}
264241
ic-version: ${{ needs.checks.outputs.ic_version }}
242+
full-build: true
243+
runner: "ubuntu-24.04-amd64"
265244
permissions:
266245
contents: read
267246
actions: read
@@ -272,7 +251,6 @@ jobs:
272251
secrets: inherit
273252

274253
build-docker-nap:
275-
if: ${{ needs.checks.outputs.stable_image_exists != 'true' }}
276254
name: Build Docker NAP
277255
needs: [checks, binaries]
278256
strategy:
@@ -290,6 +268,8 @@ jobs:
290268
tag: ${{ needs.checks.outputs.build_tag }}
291269
branch: ${{ github.ref }}
292270
ic-version: ${{ needs.checks.outputs.ic_version }}
271+
full-build: true
272+
runner: "ubuntu-24.04-amd64"
293273
permissions:
294274
contents: read
295275
actions: read
@@ -300,7 +280,6 @@ jobs:
300280
secrets: inherit
301281

302282
tag-stable:
303-
if: ${{ needs.checks.outputs.stable_image_exists != 'true' }}
304283
name: Tag build image as stable
305284
needs: [checks, build-docker, build-docker-plus, build-docker-nap]
306285
permissions:
@@ -388,6 +367,7 @@ jobs:
388367
ic_version: edge
389368
chart_version: 0.0.0-edge
390369
nginx_helm_repo: false
370+
runner: "ubuntu-24.04-amd64"
391371
permissions:
392372
contents: write # for pushing to Helm Charts repository
393373
packages: write # for helm to push to GHCR
@@ -461,15 +441,6 @@ jobs:
461441
username: oauth2accesstoken
462442
password: ${{ steps.auth.outputs.access_token }}
463443

464-
# - name: Run Trivy vulnerability scanner
465-
# uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 # 0.24.0
466-
# continue-on-error: true
467-
# with:
468-
# image-ref: ${{ steps.meta.outputs.tags }}
469-
# format: "sarif"
470-
# output: "${{ steps.directory.outputs.directory }}/trivy.sarif"
471-
# ignore-unfixed: "true"
472-
473444
- name: DockerHub Login for Docker Scout
474445
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
475446
with:
@@ -550,15 +521,6 @@ jobs:
550521
username: oauth2accesstoken
551522
password: ${{ steps.auth.outputs.access_token }}
552523

553-
# - name: Run Trivy vulnerability scanner
554-
# uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 # 0.24.0
555-
# continue-on-error: true
556-
# with:
557-
# image-ref: ${{ steps.meta.outputs.tags }}
558-
# format: "sarif"
559-
# output: "${{ steps.directory.outputs.directory }}/trivy.sarif"
560-
# ignore-unfixed: "true"
561-
562524
- name: DockerHub Login for Docker Scout
563525
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
564526
with:
@@ -646,15 +608,6 @@ jobs:
646608
username: oauth2accesstoken
647609
password: ${{ steps.auth.outputs.access_token }}
648610

649-
# - name: Run Trivy vulnerability scanner
650-
# uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 # 0.24.0
651-
# continue-on-error: true
652-
# with:
653-
# image-ref: ${{ steps.meta.outputs.tags }}
654-
# format: "sarif"
655-
# output: "${{ steps.directory.outputs.directory }}/trivy.sarif"
656-
# ignore-unfixed: "true"
657-
658611
- name: DockerHub Login for Docker Scout
659612
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
660613
with:

.github/workflows/patch-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ permissions:
3838
jobs:
3939
patch-image:
4040
name: Patch image
41-
runs-on: ubuntu-24.04
41+
runs-on: ubuntu-24.04-amd64
4242
permissions:
4343
contents: read
4444
id-token: write

.github/workflows/publish-helm.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ on:
1919
description: "Publish to the NGINX Helm repo"
2020
required: true
2121
type: boolean
22+
runner:
23+
description: "The runner to use for the workflow"
24+
default: "ubuntu-24.04"
25+
type: string
2226
workflow_call:
2327
inputs:
2428
branch:
@@ -37,6 +41,10 @@ on:
3741
description: "Publish to the NGINX Helm repo"
3842
required: true
3943
type: boolean
44+
runner:
45+
description: "The runner to use for the workflow"
46+
default: "ubuntu-24.04"
47+
type: string
4048

4149
defaults:
4250
run:
@@ -52,7 +60,7 @@ permissions:
5260
jobs:
5361
publish-helm:
5462
name: Package and Publish Helm Chart
55-
runs-on: ubuntu-24.04
63+
runs-on: ${{ inputs.runner }}
5664
permissions:
5765
contents: write # for pushing to Helm Charts repository
5866
packages: write # for helm to push to GHCR

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ jobs:
281281
ic_version: ${{ inputs.nic_version }}
282282
chart_version: ${{ inputs.chart_version }}
283283
nginx_helm_repo: false # disable automatic repo update until nginx-bot issue is resolved, manually update repo
284+
runner: "ubuntu-24.04-amd64"
284285
permissions:
285286
contents: write # for pushing to Helm Charts repository
286287
packages: write # for helm to push to GHCR

0 commit comments

Comments
 (0)