Skip to content

Commit

Permalink
Merge branch 'main' into github-rel-version
Browse files Browse the repository at this point in the history
  • Loading branch information
pdabelf5 authored Jul 31, 2024
2 parents f390463 + f674624 commit 28c65ea
Show file tree
Hide file tree
Showing 18 changed files with 116 additions and 119 deletions.
1 change: 0 additions & 1 deletion .github/config/config-oss-dockerhub
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export TARGET_REGISTRY=docker.io
export TARGET_OSS_IMAGE_PREFIX="nginx/nginx-ingress"
declare -a ADDITIONAL_TAGS=("latest" "${ADDITIONAL_TAG}")
export PUBLISH_PLUS=false
export PUBLISH_WAF=false
export PUBLISH_DOS=false
Expand Down
1 change: 0 additions & 1 deletion .github/config/config-oss-ecr
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export TARGET_REGISTRY=public.ecr.aws
export TARGET_OSS_IMAGE_PREFIX="nginx/nginx-ingress"
declare -a ADDITIONAL_TAGS=("latest" "${ADDITIONAL_TAG}")
export PUBLISH_PLUS=false
export PUBLISH_WAF=false
export PUBLISH_DOS=false
Expand Down
1 change: 0 additions & 1 deletion .github/config/config-oss-gcr-release
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export TARGET_REGISTRY=gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release
declare -a ADDITIONAL_TAGS=("latest" "${ADDITIONAL_TAG}")
export PUBLISH_PLUS=false
export PUBLISH_WAF=false
export PUBLISH_DOS=false
Expand Down
1 change: 0 additions & 1 deletion .github/config/config-oss-github
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export TARGET_REGISTRY=ghcr.io
export TARGET_OSS_IMAGE_PREFIX="nginxinc/kubernetes-ingress"
declare -a ADDITIONAL_TAGS=("latest" "${ADDITIONAL_TAG}")
export PUBLISH_PLUS=false
export PUBLISH_WAF=false
export PUBLISH_DOS=false
Expand Down
1 change: 0 additions & 1 deletion .github/config/config-oss-quay
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export TARGET_REGISTRY=quay.io
export TARGET_OSS_IMAGE_PREFIX="nginx/nginx-ingress"
declare -a ADDITIONAL_TAGS=("latest" "${ADDITIONAL_TAG}")
export PUBLISH_PLUS=false
export PUBLISH_WAF=false
export PUBLISH_DOS=false
Expand Down
1 change: 0 additions & 1 deletion .github/config/config-plus-azure
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ declare -a NAP_WAF_TAG_POSTFIX_LIST=("")
declare -a NAP_DOS_TAG_POSTFIX_LIST=("")
declare -a NAP_WAFV5_TAG_POSTFIX_LIST=()
declare -a NAP_WAF_DOS_TAG_POSTFIX_LIST=("")
declare -a ADDITIONAL_TAGS=()
export PUBLISH_OSS=false
1 change: 0 additions & 1 deletion .github/config/config-plus-ecr
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ declare -a NAP_WAF_TAG_POSTFIX_LIST=("-mktpl")
declare -a NAP_DOS_TAG_POSTFIX_LIST=("-mktpl")
declare -a NAP_WAFV5_TAG_POSTFIX_LIST=()
declare -a NAP_WAF_DOS_TAG_POSTFIX_LIST=("-mktpl")
declare -a ADDITIONAL_TAGS=()
export PUBLISH_OSS=false
1 change: 0 additions & 1 deletion .github/config/config-plus-gcr-public
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ declare -a PLUS_TAG_POSTFIX_LIST=("")
declare -a NAP_WAF_TAG_POSTFIX_LIST=("")
declare -a NAP_WAFV5_TAG_POSTFIX_LIST=()
declare -a NAP_DOS_TAG_POSTFIX_LIST=()
declare -a ADDITIONAL_TAGS=(${ADDITIONAL_TAG})
1 change: 0 additions & 1 deletion .github/config/config-plus-nginx
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ declare -a NAP_WAF_TAG_POSTFIX_LIST=("" "-ubi")
declare -a NAP_WAFV5_TAG_POSTFIX_LIST=("" "-ubi")
declare -a NAP_DOS_TAG_POSTFIX_LIST=("" "-ubi")
declare -a NAP_WAF_DOS_TAG_POSTFIX_LIST=("" "-ubi")
declare -a ADDITIONAL_TAGS=("latest" "${ADDITIONAL_TAG}")
export PUBLISH_OSS=false
61 changes: 0 additions & 61 deletions .github/scripts/copy-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ declare -a NAP_WAF_TAG_POSTFIX_LIST=("" "-ubi" "-alpine-fips")
declare -a NAP_WAFV5_TAG_POSTFIX_LIST=("" "-ubi" "-alpine-fips")
declare -a NAP_DOS_TAG_POSTFIX_LIST=("" "-ubi")
declare -a NAP_WAF_DOS_TAG_POSTFIX_LIST=("" "-ubi")
declare -a ADDITIONAL_TAGS=("latest" "${ADDITIONAL_TAG}")

CONFIG_PATH=${CONFIG_PATH:-~/.nic-release/config}
if [ -f "$CONFIG_PATH" ]; then
Expand Down Expand Up @@ -96,16 +95,6 @@ if $PUBLISH_OSS; then
if ! $DRY_RUN; then
${SKOPEO_BIN} copy --retry-times 5 ${ARCH_OPTS} ${SOURCE_OPTS} ${TARGET_OPTS} docker://${image} docker://${new_tag}
fi
for tag in "${ADDITIONAL_TAGS[@]}"; do
if [ -z "${tag}" ]; then
continue
fi
additional_tag=${TARGET_REGISTRY}/${TARGET_OSS_IMAGE_PREFIX}:${tag}${postfix}
echo " Pushing image OSS ${additional_tag}..."
if ! $DRY_RUN; then
${SKOPEO_BIN} copy --retry-times 5 ${ARCH_OPTS} ${SOURCE_OPTS} ${TARGET_OPTS} docker://${image} docker://${additional_tag}
fi
done
done
else
echo "Skipping Publish OSS flow"
Expand All @@ -123,16 +112,6 @@ if $PUBLISH_PLUS; then
if ! $DRY_RUN; then
${SKOPEO_BIN} copy --retry-times 5 ${ARCH_OPTS} ${SOURCE_OPTS} ${TARGET_OPTS} docker://${image} docker://${new_tag}
fi
for tag in "${ADDITIONAL_TAGS[@]}"; do
if [ -z "${tag}" ]; then
continue
fi
additional_tag=${TARGET_REGISTRY}/${TARGET_PLUS_IMAGE_PREFIX}:${tag}${postfix}
echo " Pushing image Plus ${additional_tag}..."
if ! $DRY_RUN; then
${SKOPEO_BIN} copy --retry-times 5 ${ARCH_OPTS} ${SOURCE_OPTS} ${TARGET_OPTS} docker://${image} docker://${additional_tag}
fi
done
fi
done
else
Expand All @@ -151,16 +130,6 @@ if $PUBLISH_WAF; then
if ! $DRY_RUN; then
${SKOPEO_BIN} copy --retry-times 5 ${ARCH_OPTS} ${SOURCE_OPTS} ${TARGET_OPTS} docker://${image} docker://${new_tag}
fi
for tag in "${ADDITIONAL_TAGS[@]}"; do
if [ -z "${tag}" ]; then
continue
fi
additional_tag=${TARGET_REGISTRY}/${TARGET_NAP_WAF_IMAGE_PREFIX}:${tag}${postfix}
echo " Pushing image NAP WAF ${additional_tag}..."
if ! $DRY_RUN; then
${SKOPEO_BIN} copy --retry-times 5 ${ARCH_OPTS} ${SOURCE_OPTS} ${TARGET_OPTS} docker://${image} docker://${additional_tag}
fi
done
fi
done
for postfix in "${NAP_WAFV5_TAG_POSTFIX_LIST[@]}"; do
Expand All @@ -174,16 +143,6 @@ if $PUBLISH_WAF; then
if ! $DRY_RUN; then
${SKOPEO_BIN} copy --retry-times 5 ${ARCH_OPTS} ${SOURCE_OPTS} ${TARGET_OPTS} docker://${image} docker://${new_tag}
fi
for tag in "${ADDITIONAL_TAGS[@]}"; do
if [ -z "${tag}" ]; then
continue
fi
additional_tag=${TARGET_REGISTRY}/${TARGET_NAP_WAFV5_IMAGE_PREFIX}:${tag}${postfix}
echo " Pushing image NAP WAFV5 ${additional_tag}..."
if ! $DRY_RUN; then
${SKOPEO_BIN} copy --retry-times 5 ${ARCH_OPTS} ${SOURCE_OPTS} ${TARGET_OPTS} docker://${image} docker://${additional_tag}
fi
done
fi
done
else
Expand All @@ -202,16 +161,6 @@ if $PUBLISH_DOS; then
if ! $DRY_RUN; then
${SKOPEO_BIN} copy --retry-times 5 ${ARCH_OPTS} ${SOURCE_OPTS} ${TARGET_OPTS} docker://${image} docker://${new_tag}
fi
for tag in "${ADDITIONAL_TAGS[@]}"; do
if [ -z "${tag}" ]; then
continue
fi
additional_tag=${TARGET_REGISTRY}/${TARGET_NAP_DOS_IMAGE_PREFIX}:${tag}${postfix}
echo " Pushing image NAP DOS ${additional_tag}..."
if ! $DRY_RUN; then
${SKOPEO_BIN} copy --retry-times 5 ${ARCH_OPTS} ${SOURCE_OPTS} ${TARGET_OPTS} docker://${image} docker://${additional_tag}
fi
done
fi
done
else
Expand All @@ -230,16 +179,6 @@ if $PUBLISH_WAF_DOS; then
if ! $DRY_RUN; then
${SKOPEO_BIN} copy --retry-times 5 ${ARCH_OPTS} ${SOURCE_OPTS} ${TARGET_OPTS} docker://${image} docker://${new_tag}
fi
for tag in "${ADDITIONAL_TAGS[@]}"; do
if [ -z "${tag}" ]; then
continue
fi
additional_tag=${TARGET_REGISTRY}/${TARGET_NAP_WAF_DOS_IMAGE_PREFIX}:${tag}${postfix}
echo " Pushing image NAP WAF/DOS ${additional_tag}..."
if ! $DRY_RUN; then
${SKOPEO_BIN} copy --retry-times 5 ${ARCH_OPTS} ${SOURCE_OPTS} ${TARGET_OPTS} docker://${image} docker://${additional_tag}
fi
done
fi
done
else
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build-base-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ jobs:
run: |
[[ "${{ matrix.nap_modules }}" == "waf,dos" ]] && modules="waf-dos" || modules="${{ matrix.nap_modules }}"
echo "modules=${modules}" >> $GITHUB_OUTPUT
[[ "${{ matrix.nap_modules }}" =~ waf ]] && agent="true" || agent="false"
echo "agent=${agent}" >> $GITHUB_OUTPUT
if: ${{ matrix.nap_modules != '' }}

- name: Docker meta
Expand Down Expand Up @@ -242,6 +244,7 @@ jobs:
BUILD_OS=${{ matrix.image }}
IC_VERSION=${{ needs.checks.outputs.ic_version }}
NAP_MODULES=${{ matrix.nap_modules }}
${{ contains(matrix.nap_modules,'waf') && format('NGINX_AGENT={0}', steps.nap_modules.outputs.agent) || '' }}
secrets: |
"nginx-repo.crt=${{ secrets.NGINX_AP_CRT }}"
"nginx-repo.key=${{ secrets.NGINX_AP_KEY }}"
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build-plus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@ jobs:
id: nap_modules
run: |
[[ "${{ inputs.nap-modules }}" == "waf,dos" ]] && modules="waf-dos" || name="${{ inputs.nap-modules }}"
echo "name=${name}" >> $GITHUB_OUTPUT
[[ "${{ inputs.nap-modules }}" == "waf,dos" ]] && modules="both" || modules="${{ inputs.nap-modules }}"
echo "modules=${modules}" >> $GITHUB_OUTPUT
echo "name=${name}" >> $GITHUB_OUTPUT
[[ "${{ inputs.nap-modules }}" =~ waf ]] && agent="true" || agent="false"
echo "agent=${agent}" >> $GITHUB_OUTPUT
if: ${{ inputs.nap-modules != '' }}

- name: Docker meta
Expand Down Expand Up @@ -143,6 +145,7 @@ jobs:
BUILD_OS=${{ inputs.image }}
IC_VERSION=${{ inputs.ic-version && inputs.ic-version || steps.meta.outputs.version }}
${{ inputs.nap-modules != '' && format('NAP_MODULES={0}', steps.nap_modules.outputs.name) || '' }}
${{ contains(inputs.nap-modules,'waf') && format('NGINX_AGENT={0}', steps.nap_modules.outputs.agent) || '' }}
secrets: |
"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 }}"
Expand Down Expand Up @@ -187,6 +190,7 @@ jobs:
${{ inputs.authenticated && format('PREBUILT_BASE_IMG={0}', steps.base_name.outputs.image ) }}
IC_VERSION=${{ inputs.ic-version && inputs.ic-version || steps.meta.outputs.version }}
${{ inputs.nap-modules != '' && format('NAP_MODULES={0}', steps.nap_modules.outputs.name) || '' }}
${{ contains(inputs.nap-modules,'waf') && format('NGINX_AGENT={0}', steps.nap_modules.outputs.agent) || '' }}
${{ (contains(inputs.target, 'aws') && inputs.nap-modules != '') && format('NAP_MODULES_AWS={0}', steps.nap_modules.outputs.modules) || '' }}
${{ contains(inputs.image, 'v5') && 'WAF_VERSION=v5' || '' }}
secrets: |
Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/oss-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ on:
target_tag:
required: true
type: string
short_target_tag:
type: string
default: ''
dry_run:
type: boolean
default: false
Expand All @@ -53,9 +50,6 @@ on:
target_tag:
required: true
type: string
short_target_tag:
type: string
default: ''
dry_run:
type: boolean
default: false
Expand Down Expand Up @@ -102,9 +96,6 @@ jobs:
if ${{ inputs.dry_run }}; then
export DRY_RUN=true
fi
if [ "${{ inputs.short_target_tag }}" != "" ]; then
export ADDITIONAL_TAG=${{ inputs.short_target_tag }}
fi
.github/scripts/copy-images.sh
release-oss-to-ecr-public-registry:
Expand Down Expand Up @@ -149,9 +140,6 @@ jobs:
export CONFIG_PATH=.github/config/config-oss-ecr
export SOURCE_TAG=${{ inputs.source_tag }}
export TARGET_TAG=${{ inputs.target_tag }}
if [ "${{ inputs.short_target_tag }}" != "" ]; then
export ADDITIONAL_TAG=${{ inputs.short_target_tag }}
fi
if ${{ inputs.dry_run }}; then
export DRY_RUN=true
fi
Expand Down Expand Up @@ -194,9 +182,6 @@ jobs:
export CONFIG_PATH=.github/config/config-oss-dockerhub
export SOURCE_TAG=${{ inputs.source_tag }}
export TARGET_TAG=${{ inputs.target_tag }}
if [ "${{ inputs.short_target_tag }}" != "" ]; then
export ADDITIONAL_TAG=${{ inputs.short_target_tag }}
fi
if ${{ inputs.dry_run }}; then
export DRY_RUN=true
fi
Expand Down Expand Up @@ -240,9 +225,6 @@ jobs:
export CONFIG_PATH=.github/config/config-oss-quay
export SOURCE_TAG=${{ inputs.source_tag }}
export TARGET_TAG=${{ inputs.target_tag }}
if [ "${{ inputs.short_target_tag }}" != "" ]; then
export ADDITIONAL_TAG=${{ inputs.short_target_tag }}
fi
if ${{ inputs.dry_run }}; then
export DRY_RUN=true
fi
Expand Down Expand Up @@ -287,9 +269,6 @@ jobs:
export CONFIG_PATH=.github/config/config-oss-github
export SOURCE_TAG=${{ inputs.source_tag }}
export TARGET_TAG=${{ inputs.target_tag }}
if [ "${{ inputs.short_target_tag }}" != "" ]; then
export ADDITIONAL_TAG=${{ inputs.short_target_tag }}
fi
if ${{ inputs.dry_run }}; then
export DRY_RUN=true
fi
Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/plus-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ on:
target_tag:
required: true
type: string
short_target_tag:
type: string
default: ''
dry_run:
type: boolean
default: false
Expand All @@ -53,9 +50,6 @@ on:
target_tag:
required: true
type: string
short_target_tag:
type: string
default: ''
dry_run:
type: boolean
default: false
Expand Down Expand Up @@ -102,9 +96,6 @@ jobs:
if ${{ inputs.dry_run }}; then
export DRY_RUN=true
fi
if [ "${{ inputs.short_target_tag }}" != "" ]; then
export ADDITIONAL_TAG=${{ inputs.short_target_tag }}
fi
.github/scripts/copy-images.sh
release-to-nginx-registry:
Expand Down Expand Up @@ -156,9 +147,6 @@ jobs:
if ${{ inputs.dry_run }}; then
export DRY_RUN=true
fi
if [ "${{ inputs.short_target_tag }}" != "" ]; then
export ADDITIONAL_TAG=${{ inputs.short_target_tag }}
fi
.github/scripts/copy-images.sh
release-plus-to-gcr-marketplace-registry:
Expand Down Expand Up @@ -198,9 +186,6 @@ jobs:
if ${{ inputs.dry_run }}; then
export DRY_RUN=true
fi
if [ "${{ inputs.short_target_tag }}" != "" ]; then
export ADDITIONAL_TAG=${{ inputs.short_target_tag }}
fi
.github/scripts/copy-images.sh
release-plus-to-ecr-marketplace-registry:
Expand Down
Loading

0 comments on commit 28c65ea

Please sign in to comment.