Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure wafv5 base images are created #5771

Merged
merged 2 commits into from
Jun 18, 2024
Merged
Changes from all commits
Commits
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
16 changes: 16 additions & 0 deletions .github/workflows/build-base-images.yml
Original file line number Diff line number Diff line change
@@ -196,6 +196,22 @@ jobs:
- image: alpine-plus-nap-fips
platforms: "linux/amd64"
nap_modules: waf
- image: alpine-plus-nap-v5-fips
target: goreleaser
platforms: "linux/amd64"
nap_modules: waf
- image: debian-plus-nap-v5
target: goreleaser
platforms: "linux/amd64"
nap_modules: waf
- image: ubi-9-plus-nap-v5
target: goreleaser
platforms: "linux/amd64"
nap_modules: waf
- image: ubi-8-plus-nap-v5
target: goreleaser
platforms: "linux/amd64"
nap_modules: waf
steps:
- name: Checkout Repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
14 changes: 7 additions & 7 deletions .github/workflows/build-oss.yml
Original file line number Diff line number Diff line change
@@ -121,10 +121,10 @@ jobs:
- name: Check if base images exist
id: base_exists
run: |
if docker manifest inspect gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-base/oss:${{ inputs.base-image-md5 }}-${{ inputs.image }}; then
echo "exists=0" >> $GITHUB_OUTPUT
else
echo "exists=1" >> $GITHUB_OUTPUT
base_image="gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-base/oss:${{ inputs.base-image-md5 }}-${{ inputs.image }}"
echo "image=${base_image}" >> $GITHUB_OUTPUT
if docker manifest inspect ${base_image}; then
echo "exists=true" >> $GITHUB_OUTPUT
fi
if: ${{ ! inputs.forked-workflow }}

@@ -136,14 +136,14 @@ jobs:
cache-from: type=gha,scope=${{ inputs.image }}
cache-to: type=gha,scope=${{ inputs.image }},mode=max
target: common
tags: gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-base/oss:${{ inputs.base-image-md5 }}-${{ inputs.image }}
tags: ${{ steps.base_exists.outputs.image }}
platforms: ${{ inputs.platforms }}
pull: true
push: true
build-args: |
BUILD_OS=${{ inputs.image }}
IC_VERSION=${{ inputs.tag }}
if: ${{ ! inputs.forked-workflow && steps.base_exists.outputs.exists != 0 }}
if: ${{ ! inputs.forked-workflow && steps.base_exists.outputs.exists != 'true' }}

- name: Get short tag
id: tag
@@ -206,7 +206,7 @@ jobs:
provenance: false
build-args: |
BUILD_OS=${{ inputs.image }}
${{ ! inputs.forked-workflow && format('PREBUILT_BASE_IMG=gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-base/oss:{0}-{1}', inputs.base-image-md5, inputs.image) || '' }}
${{ ! inputs.forked-workflow && format('PREBUILT_BASE_IMG={0}', steps.base_exists.outputs.image) || '' }}
IC_VERSION=${{ (github.event_name == 'pull_request' || startsWith(github.ref, 'refs/heads/release-')) && 'CI' || steps.meta.outputs.version }}

- name: Certify Images
14 changes: 7 additions & 7 deletions .github/workflows/build-plus.yml
Original file line number Diff line number Diff line change
@@ -153,10 +153,10 @@ jobs:
- name: Check if base images exist
id: base_exists
run: |
if docker manifest inspect gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-base/plus:${{ inputs.base-image-md5 }}-${{ inputs.image }}${{ steps.nap_modules.outputs.name != '' && format('-{0}', steps.nap_modules.outputs.name) || '' }}; then
echo "exists=0" >> $GITHUB_OUTPUT
else
echo "exists=1" >> $GITHUB_OUTPUT
base_image="gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-base/plus:${{ inputs.base-image-md5 }}-${{ inputs.image }}${{ steps.nap_modules.outputs.name != '' && format('-{0}', steps.nap_modules.outputs.name) || '' }}${{ contains(inputs.image, 'v5') && '-v5' || '' }}"
echo "image=${base_image}" >> $GITHUB_OUTPUT
if docker manifest inspect ${base_image}; then
echo "exists=true" >> $GITHUB_OUTPUT
fi
if: ${{ ! inputs.forked-workflow }}

@@ -168,7 +168,7 @@ jobs:
cache-from: type=gha,scope=${{ inputs.image }}${{ steps.nap_modules.outputs.name != '' && format('-{0}', steps.nap_modules.outputs.name) || '' }}
cache-to: type=gha,scope=${{ inputs.image }}${{ steps.nap_modules.outputs.name != '' && format('-{0}', steps.nap_modules.outputs.name) || '' }},mode=max
target: common
tags: gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-base/plus:${{ inputs.base-image-md5 }}-${{ inputs.image }}${{ steps.nap_modules.outputs.name != '' && format('-{0}', steps.nap_modules.outputs.name) || '' }}
tags: ${{ steps.base_exists.outputs.image }}
platforms: ${{ inputs.platforms }}
pull: true
push: true
@@ -180,7 +180,7 @@ jobs:
"nginx-repo.crt=${{ inputs.nap_modules != '' && secrets.NGINX_AP_CRT || secrets.NGINX_CRT }}"
"nginx-repo.key=${{ inputs.nap_modules != '' && secrets.NGINX_AP_KEY || secrets.NGINX_KEY }}"
${{ inputs.nap_modules != '' && contains(inputs.image, 'ubi') && format('"rhel_license={0}"', secrets.RHEL_LICENSE) || '' }}
if: ${{ ! inputs.forked-workflow && steps.base_exists.outputs.exists != 0 }}
if: ${{ ! inputs.forked-workflow && steps.base_exists.outputs.exists != 'true' }}

- name: Build Plus Docker image
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
@@ -202,7 +202,7 @@ jobs:
provenance: false
build-args: |
BUILD_OS=${{ inputs.image }}
PREBUILT_BASE_IMG=gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-base/plus:${{ inputs.base-image-md5 }}-${{ inputs.image }}${{ steps.nap_modules.outputs.name != '' && format('-{0}', steps.nap_modules.outputs.name) || '' }}
${{ ! inputs.forked-workflow && format('PREBUILT_BASE_IMG={0}', steps.base_exists.outputs.image) || '' }}
IC_VERSION=${{ (github.ref_type == 'tag' && vars.OLD_RELEASE_FLOW == 'true') && steps.meta.outputs.version || 'CI' }}
${{ inputs.nap_modules != '' && format('NAP_MODULES={0}', steps.nap_modules.outputs.modules) || '' }}
${{ contains(inputs.image, 'v5') && 'WAF_VERSION=v5' || '' }}
16 changes: 16 additions & 0 deletions .github/workflows/cache-update.yml
Original file line number Diff line number Diff line change
@@ -168,6 +168,22 @@ jobs:
target: goreleaser
platforms: "linux/amd64"
nap_modules: waf
- image: alpine-plus-nap-v5-fips
target: goreleaser
platforms: "linux/amd64"
nap_modules: waf
- image: debian-plus-nap-v5
target: goreleaser
platforms: "linux/amd64"
nap_modules: waf
- image: ubi-9-plus-nap-v5
target: goreleaser
platforms: "linux/amd64"
nap_modules: waf
- image: ubi-8-plus-nap-v5
target: goreleaser
platforms: "linux/amd64"
nap_modules: waf
uses: ./.github/workflows/build-plus.yml
with:
platforms: ${{ matrix.platforms }}
Loading