E585 Push NAP DoS image to AWS Marketplace (#3131) · nginx/kubernetes-ingress@e0bd161 · GitHub
[go: up one dir, main page]

Skip to content

Commit e0bd161

Browse files
authored
Push NAP DoS image to AWS Marketplace (#3131)
1 parent 4e6caf0 commit e0bd161

File tree

3 files changed

+28
-4
lines changed

3 files changed

+28
-4
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ jobs:
9898
GOPATH: ${{ needs.checks.outputs.go_path }}
9999
AWS_PRODUCT_CODE: ${{ secrets.AWS_PRODUCT_CODE }}
100100
AWS_PUB_KEY: ${{ secrets.AWS_PUB_KEY }}
101+
AWS_NAP_DOS_PRODUCT_CODE: ${{ secrets.AWS_NAP_DOS_PRODUCT_CODE }}
102+
AWS_NAP_DOS_PUB_KEY: ${{ secrets.AWS_NAP_DOS_PUB_KEY }}
101103
- name: Store Artifacts in Cache
102104
uses: actions/cache@v3
103105
with:
@@ -327,6 +329,8 @@ jobs:
327329
GOPATH: ${{ needs.checks.outputs.go_path }}
328330
AWS_PRODUCT_CODE: ${{ secrets.AWS_PRODUCT_CODE }}
329331
AWS_PUB_KEY: ${{ secrets.AWS_PUB_KEY }}
332+
AWS_NAP_DOS_PRODUCT_CODE: ${{ secrets.AWS_NAP_DOS_PRODUCT_CODE }}
333+
AWS_NAP_DOS_PUB_KEY: ${{ secrets.AWS_NAP_DOS_PUB_KEY }}
330334
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_COMMUNITY }}
331335
AZURE_STORAGE_ACCOUNT: ${{ secrets.AZURE_STORAGE_ACCOUNT }}
332336
AZURE_STORAGE_KEY: ${{ secrets.AZURE_STORAGE_KEY }}
@@ -493,6 +497,9 @@ jobs:
493497
- image: debian-plus-nap
494498
platforms: "linux/amd64"
495499
target: goreleaser
500+
- image: debian-plus-nap
501+
platforms: "linux/amd64"
502+
target: aws
496503

497504
steps:
498505
- name: Checkout Repository
@@ -531,10 +538,9 @@ jobs:
531538
uses: docker/metadata-action@v4
532539
with:
533540
images: |
534-
name=gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic${{ contains(matrix.image, 'nap') && '-dos' || '' }}/nginx-plus-ingress
535541
name=gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic${{ contains(matrix.image, 'nap') && '-dos' || '' }}/nginx-plus-ingress,enable=${{ startsWith(github.ref, 'refs/tags/') }}
536542
name=gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/staging/nginx-ic${{ contains(matrix.image, 'nap') && '-dos' || '' }}/nginx-plus-ingress,enable=${{ startsWith(github.ref, 'refs/heads/release') }}
537-
name=709825985650.dkr.ecr.us-east-1.amazonaws.com/nginx/nginx-plus-ingress,enable=${{ startsWith(github.ref, 'refs/tags/') && contains(matrix.target, 'aws') }}
543+
name=709825985650.dkr.ecr.us-east-1.amazonaws.com/nginx/nginx-plus-ingress${{ contains(matrix.image, 'nap') && '-dos' || '' }},enable=${{ startsWith(github.ref, 'refs/tags/') && contains(matrix.target, 'aws') }}
538544
flavor: |
539545
suffix=${{ contains(matrix.image, 'ubi') && '-ubi' || '' }}${{ contains(matrix.image, 'alpine') && '-alpine' || '' }}${{ contains(matrix.target, 'aws') && '-mktpl' || '' }},onlatest=true
540546
latest=${{ contains(matrix.target, 'aws') && 'false' || 'auto' }}

.goreleaser.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,23 @@ builds:
4141
binary: nginx-ingress
4242
tags:
4343
- aws
44+
- id: aws-nap-dos
45+
goos:
46+
- linux
47+
goarch:
48+
- amd64
49+
flags:
50+
- -trimpath
51+
gcflags:
52+
- all=-trimpath={{.Env.GOPATH}}
53+
asmflags:
54+
- all=-trimpath={{.Env.GOPATH}}
55+
ldflags:
56+
- -s -w -X main.version={{.Version}} -X main.productCode={{.Env.AWS_NAP_DOS_PRODUCT_CODE}} -X main.pubKeyString={{.Env.AWS_NAP_DOS_PUB_KEY}}
57+
main: ./cmd/nginx-ingress/
58+
binary: nginx-ingress
59+
tags:
60+
- aws
4461

4562
archives:
4663
- id: kubernetes-ingress

build/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,16 +273,17 @@ ARG TARGETARCH
273273

274274
LABEL org.nginx.kic.image.build.version="goreleaser"
275275

276-
COPY --link --chown=101:0 dist/kubernetes-ingress_linux_$TARGETARCH*/nginx-ingress /
276+
COPY --link --chown=101:0 dist/kubernetes-ingress_linux_${TARGETARCH}*/nginx-ingress /
277277

278278

279279
############################################# Create image with nginx-ingress built by GoReleaser for AWS Marketplace #############################################
280280
FROM common AS aws
281281
ARG TARGETARCH
282+
ARG NAP_MODULES=
282283

283284
LABEL org.nginx.kic.image.build.version="aws"
284285

285-
COPY --link --chown=101:0 dist/aws_linux_$TARGETARCH*/nginx-ingress /
286+
COPY --link --chown=101:0 dist/aws*${NAP_MODULES}_linux_${TARGETARCH}*/nginx-ingress /
286287

287288

288289
############################################# Create image with nginx-ingress extracted from image on Docker Hub #############################################

0 commit comments

Comments
 (0)
0