From e0fb5dcb7ed32b0be2a22f68062528b64290bca2 Mon Sep 17 00:00:00 2001 From: Paul Abel <128620221+pdabelf5@users.noreply.github.com> Date: Tue, 3 Sep 2024 09:06:20 +0100 Subject: [PATCH] images to patch sourced from json file (#6326) --- .github/data/patch-images.json | 110 +++++++++++++ .github/workflows/image-promotion.yml | 2 + .github/workflows/oss-release.yml | 20 ++- .github/workflows/plus-release.yml | 20 ++- .github/workflows/regression.yml | 26 ++++ .github/workflows/release.yml | 85 +++++++++- .github/workflows/update-docker-images.yml | 173 +++------------------ 7 files changed, 272 insertions(+), 164 deletions(-) create mode 100644 .github/data/patch-images.json diff --git a/.github/data/patch-images.json b/.github/data/patch-images.json new file mode 100644 index 0000000000..3587d0d313 --- /dev/null +++ b/.github/data/patch-images.json @@ -0,0 +1,110 @@ +[ + { + "source_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic/nginx-ingress", + "source_os": "debian", + "target_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress", + "platforms": "linux/arm, linux/arm64, linux/amd64, linux/ppc64le, linux/s390x" + }, + { + "source_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic/nginx-ingress", + "source_os": "alpine", + "target_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress", + "platforms": "linux/arm, linux/arm64, linux/amd64, linux/ppc64le, linux/s390x" + }, + { + "source_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic/nginx-ingress", + "source_os": "ubi", + "target_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress", + "platforms": "linux/arm64, linux/amd64, linux/ppc64le, linux/s390x" + }, + { + "source_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic/nginx-plus-ingress", + "source_os": "debian", + "target_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress", + "platforms": "linux/arm64, linux/amd64" + }, + { + "source_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic/nginx-plus-ingress", + "source_os": "mktpl", + "target_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress", + "platforms": "linux/arm64, linux/amd64" + }, + { + "source_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic/nginx-plus-ingress", + "source_os": "alpine", + "target_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress", + "platforms": "linux/arm64, linux/amd64" + }, + { + "source_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic/nginx-plus-ingress", + "source_os": "ubi", + "target_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress", + "platforms": "linux/arm64, linux/amd64" + }, + { + "source_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic-nap/nginx-plus-ingress", + "source_os": "debian", + "target_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress", + "platforms": "linux/amd64" + }, + { + "source_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic-nap/nginx-plus-ingress", + "source_os": "mktpl", + "target_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress", + "platforms": "linux/amd64" + }, + { + "source_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic-nap/nginx-plus-ingress", + "source_os": "ubi", + "target_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress", + "platforms": "linux/amd64" + }, + { + "source_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic-nap-v5/nginx-plus-ingress", + "source_os": "debian", + "target_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress", + "platforms": "linux/amd64" + }, + { + "source_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic-nap-v5/nginx-plus-ingress", + "source_os": "ubi", + "target_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress", + "platforms": "linux/amd64" + }, + { + "source_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic-dos/nginx-plus-ingress", + "source_os": "debian", + "target_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress", + "platforms": "linux/amd64" + }, + { + "source_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic-dos/nginx-plus-ingress", + "source_os": "mktpl", + "target_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress", + "platforms": "linux/amd64" + }, + { + "source_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic-dos/nginx-plus-ingress", + "source_os": "ubi", + "target_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress", + "platforms": "linux/amd64" + }, + { + "source_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic-dos-nap/nginx-plus-ingress", + "source_os": "debian", + "target_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress", + "platforms": "linux/amd64" + }, + { + "source_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic-dos-nap/nginx-plus-ingress", + "source_os": "mktpl", + "target_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress", + "platforms": "linux/amd64" + }, + { + "source_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic-dos-nap/nginx-plus-ingress", + "source_os": "ubi", + "target_image": "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress", + "platforms": "linux/amd64" + } +] diff --git a/.github/workflows/image-promotion.yml b/.github/workflows/image-promotion.yml index abbc9a795f..106ac42357 100644 --- a/.github/workflows/image-promotion.yml +++ b/.github/workflows/image-promotion.yml @@ -319,6 +319,7 @@ jobs: github_public_registry: true source_tag: ${{ needs.checks.outputs.stable_tag }} target_tag: "edge" + branch: ${{ github.ref_name }} dry_run: false permissions: contents: read @@ -340,6 +341,7 @@ jobs: az_mktpl_registry: false source_tag: ${{ needs.checks.outputs.stable_tag }} target_tag: "edge" + branch: ${{ github.ref_name }} dry_run: false permissions: contents: read diff --git a/.github/workflows/oss-release.yml b/.github/workflows/oss-release.yml index 70ea3d00c8..0dca5eed25 100644 --- a/.github/workflows/oss-release.yml +++ b/.github/workflows/oss-release.yml @@ -24,9 +24,10 @@ on: target_tag: required: true type: string - short_target_tag: + branch: + required: false type: string - default: '' + default: "main" dry_run: type: boolean default: false @@ -53,9 +54,10 @@ on: target_tag: required: true type: string - short_target_tag: + branch: + required: false type: string - default: '' + default: "main" dry_run: type: boolean default: false @@ -78,6 +80,8 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + ref: ${{ inputs.branch }} - name: Authenticate to Google Cloud id: gcr-auth @@ -117,6 +121,8 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + ref: ${{ inputs.branch }} - name: Authenticate to Google Cloud id: gcr-auth @@ -167,6 +173,8 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + ref: ${{ inputs.branch }} - name: Authenticate to Google Cloud id: gcr-auth @@ -212,6 +220,8 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + ref: ${{ inputs.branch }} - name: Authenticate to Google Cloud id: gcr-auth @@ -259,6 +269,8 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + ref: ${{ inputs.branch }} - name: Authenticate to Google Cloud id: gcr-auth diff --git a/.github/workflows/plus-release.yml b/.github/workflows/plus-release.yml index 86bf63d7bc..1d25cd9d6f 100644 --- a/.github/workflows/plus-release.yml +++ b/.github/workflows/plus-release.yml @@ -24,9 +24,10 @@ on: target_tag: required: true type: string - short_target_tag: + branch: + required: false type: string - default: '' + default: "main" dry_run: type: boolean default: false @@ -53,9 +54,10 @@ on: target_tag: required: true type: string - short_target_tag: + branch: + required: false type: string - default: '' + default: "main" dry_run: type: boolean default: false @@ -78,6 +80,8 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + ref: ${{ inputs.branch }} - name: Authenticate to Google Cloud id: gcr-auth @@ -117,6 +121,8 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + ref: ${{ inputs.branch }} - name: Authenticate to Google Cloud id: gcr-auth @@ -171,6 +177,8 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + ref: ${{ inputs.branch }} - name: Authenticate to Google Cloud id: gcr-priv-auth @@ -213,6 +221,8 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + ref: ${{ inputs.branch }} - name: Authenticate to Google Cloud id: gcr-auth @@ -260,6 +270,8 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + ref: ${{ inputs.branch }} - name: Authenticate to Google Cloud id: gcr-auth diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index 22e284ec93..966e1e3b83 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -80,6 +80,30 @@ jobs: echo stable_tag: ${{ steps.vars.outputs.stable_tag }} echo branch: ${{ steps.vars.outputs.branch }} + unit-tests: + name: Unit Tests + runs-on: ubuntu-24.04 + needs: [checks] + steps: + - name: Checkout Repository + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + ref: ${{ needs.checks.outputs.branch }} + + - name: Setup Golang Environment + uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 + with: + go-version-file: go.mod + + - name: Run Tests + run: make cover + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0 + with: + files: ./coverage.txt + token: ${{ secrets.CODECOV_TOKEN }} # required + helm-tests: name: Helm Tests ${{ matrix.base-os }} runs-on: ubuntu-22.04 @@ -280,6 +304,7 @@ jobs: quay_public_registry: true github_public_registry: true source_tag: ${{ needs.checks.outputs.stable_tag }} + branch: ${{ needs.checks.outputs.branch }} target_tag: "nightly" dry_run: false permissions: @@ -301,6 +326,7 @@ jobs: az_mktpl_registry: false source_tag: ${{ needs.checks.outputs.stable_tag }} target_tag: "nightly" + branch: ${{ needs.checks.outputs.branch }} dry_run: false permissions: contents: read diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7466f4ce6d..d6d0c7470e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -136,8 +136,8 @@ jobs: quay_public_registry: true github_public_registry: true source_tag: ${{ needs.variables.outputs.source_tag }} - target_tag: ${{ inputs.nic_version }} - short_target_tag: ${{ needs.variables.outputs.short_tag }} + target_tag: ${{ matrix.tag }} + branch: ${{ inputs.release_branch }} dry_run: ${{ inputs.dry_run }} permissions: contents: read @@ -153,12 +153,91 @@ jobs: with: gcr_release_registry: true nginx_registry: true + gcr_mktpl_registry: false + ecr_mktpl_registry: false + az_mktpl_registry: false + source_tag: ${{ needs.variables.outputs.source_tag }} + target_tag: ${{ inputs.nic_version }} + branch: ${{ inputs.release_branch }} + dry_run: ${{ inputs.dry_run }} + permissions: + contents: read + id-token: write + secrets: inherit + + release-plus-gcr-mktpl: + if: ${{ ! cancelled() && ! failure() && ! contains(inputs.skip_step, 'release-plus') }} + name: Release Docker Plus + needs: [variables] + uses: ./.github/workflows/plus-release.yml + strategy: + fail-fast: false + matrix: + tag: + - "${{ inputs.nic_version }}" + - "${{ needs.variables.outputs.short_tag }}" + - "${{ inputs.nic_version }}-${{ needs.variables.outputs.date }}" + with: + gcr_release_registry: false + nginx_registry: false gcr_mktpl_registry: true + ecr_mktpl_registry: false + az_mktpl_registry: false + source_tag: ${{ needs.variables.outputs.source_tag }} + target_tag: ${{ inputs.nic_version }} + branch: ${{ inputs.release_branch }} + dry_run: ${{ inputs.dry_run }} + permissions: + contents: read + id-token: write + secrets: inherit + + release-plus-aws-mktpl: + if: ${{ ! cancelled() && ! failure() && ! contains(inputs.skip_step, 'release-plus') }} + name: Release Docker Plus + needs: [variables] + uses: ./.github/workflows/plus-release.yml + strategy: + fail-fast: false + matrix: + tag: + - "${{ inputs.nic_version }}" + - "${{ inputs.nic_version }}-${{ needs.variables.outputs.date }}" + with: + gcr_release_registry: false + nginx_registry: false + gcr_mktpl_registry: false ecr_mktpl_registry: true + az_mktpl_registry: false + source_tag: ${{ needs.variables.outputs.source_tag }} + target_tag: ${{ inputs.nic_version }} + branch: ${{ inputs.release_branch }} + dry_run: ${{ inputs.dry_run }} + permissions: + contents: read + id-token: write + secrets: inherit + + release-plus-azure-mktpl: + if: ${{ ! cancelled() && ! failure() && ! contains(inputs.skip_step, 'release-plus') }} + name: Release Docker Plus + needs: [variables] + uses: ./.github/workflows/plus-release.yml + strategy: + fail-fast: false + matrix: + tag: + - "${{ inputs.nic_version }}" + - "${{ inputs.nic_version }}-${{ needs.variables.outputs.date }}" + with: + gcr_release_registry: false + nginx_registry: false + gcr_mktpl_registry: false + ecr_mktpl_registry: false az_mktpl_registry: true source_tag: ${{ needs.variables.outputs.source_tag }} target_tag: ${{ inputs.nic_version }} - short_target_tag: ${{ needs.variables.outputs.short_tag }} + branch: ${{ inputs.release_branch }} dry_run: ${{ inputs.dry_run }} permissions: contents: read diff --git a/.github/workflows/update-docker-images.yml b/.github/workflows/update-docker-images.yml index c40cefc65a..26c26cbe1f 100644 --- a/.github/workflows/update-docker-images.yml +++ b/.github/workflows/update-docker-images.yml @@ -31,6 +31,7 @@ jobs: tag: ${{ steps.kic.outputs.tag }} short_tag: ${{ steps.kic.outputs.short }} date: ${{ steps.kic.outputs.date }} + matrix: ${{ steps.kic.outputs.matrix }} steps: - name: Checkout Repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 @@ -51,163 +52,24 @@ jobs: echo "date=${date}" >> $GITHUB_OUTPUT short="${tag%.*}" echo "short=$short" >> $GITHUB_OUTPUT + echo "matrix=$(cat .github/data/patch-images.json" >> $GITHUB_OUTPUT cat $GITHUB_OUTPUT - patch-oss-images: - name: Build OSS Images + patch-images: + name: Patch Images needs: [variables] strategy: fail-fast: false matrix: - include: - - tag: ${{ needs.variables.outputs.tag }} - target_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}" - image: gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic/nginx-ingress - target_image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress" - platforms: "linux/arm, linux/arm64, linux/amd64, linux/ppc64le, linux/s390x" - - tag: ${{ needs.variables.outputs.tag }}-alpine - target_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}-alpine" - image: gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic/nginx-ingress - target_image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress" - platforms: "linux/arm, linux/arm64, linux/amd64, linux/ppc64le, linux/s390x" - - tag: ${{ needs.variables.outputs.tag }}-ubi - target_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}-ubi" - image: gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic/nginx-ingress - target_image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress" - platforms: "linux/arm64, linux/amd64, linux/ppc64le, linux/s390x" + include: ${{ fromJSON( needs.variables.outputs.matrix ) }} uses: ./.github/workflows/patch-image.yml with: platforms: ${{ matrix.platforms }} - image: ${{ matrix.image }} - tag: ${{ matrix.tag }} + image: ${{ matrix.source_image }} + tag: ${{ matrix.source_os == 'debian' && needs.variables.outputs.tag || format('{0}-{1}', needs.variables.outputs.tag, matrix.source_os) }} ic_version: ${{ needs.variables.outputs.tag }} target_image: ${{ matrix.target_image }} - target_tag: ${{ matrix.target_tag }} - permissions: - contents: read - id-token: write - secrets: inherit - - patch-plus-images: - name: Build Plus Images - needs: [variables] - strategy: - fail-fast: false - matrix: - include: - - tag: ${{ needs.variables.outputs.tag }} - target_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}" - image: gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic/nginx-plus-ingress - target_image: gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress - platforms: "linux/arm64, linux/amd64" - - tag: ${{ needs.variables.outputs.tag }}-alpine - target_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}-alpine" - image: gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic/nginx-plus-ingress - target_image: gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress - platforms: "linux/arm64, linux/amd64" - - tag: ${{ needs.variables.outputs.tag }}-mktpl - target_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}-mktpl" - image: gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic/nginx-plus-ingress - target_image: gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress - platforms: "linux/arm64, linux/amd64" - - tag: ${{ needs.variables.outputs.tag }}-alpine-mktpl - target_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}-alpine-mktpl" - image: gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic/nginx-plus-ingress - target_image: gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress - platforms: "linux/arm64, linux/amd64" - - tag: ${{ needs.variables.outputs.tag }}-ubi - target_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}-ubi" - image: gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic/nginx-plus-ingress - target_image: gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress - platforms: "linux/arm64, linux/amd64, linux/s390x" - uses: ./.github/workflows/patch-image.yml - with: - platforms: ${{ matrix.platforms }} - image: ${{ matrix.image }} - tag: ${{ matrix.tag }} - ic_version: ${{ needs.variables.outputs.tag }} - target_image: ${{ matrix.target_image }} - target_tag: ${{ matrix.target_tag }} - permissions: - contents: read - id-token: write - secrets: inherit - - patch-plus-nap-images: - name: Build Plus NAP Images - needs: [variables] - strategy: - fail-fast: false - matrix: - include: - - tag: "${{ needs.variables.outputs.tag }}" - target_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}" - image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic-nap/nginx-plus-ingress" - target_image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress" - platforms: "linux/amd64" - - tag: "${{ needs.variables.outputs.tag }}-ubi" - target_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}-ubi" - image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic-nap/nginx-plus-ingress" - target_image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress" - platforms: "linux/amd64" - - tag: "${{ needs.variables.outputs.tag }}-mktpl" - target_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}-mktpl" - image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic-nap/nginx-plus-ingress" - target_image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress" - platforms: "linux/amd64" - - tag: "${{ needs.variables.outputs.tag }}-ubi-mktpl" - target_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}-ubi-mktpl" - image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic-nap/nginx-plus-ingress" - target_image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress" - platforms: "linux/amd64" - - tag: "${{ needs.variables.outputs.tag }}" - target_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}" - image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic-dos/nginx-plus-ingress" - target_image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress" - platforms: "linux/amd64" - - tag: "${{ needs.variables.outputs.tag }}-ubi" - target_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}-ubi" - image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic-dos/nginx-plus-ingress" - target_image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress" - platforms: "linux/amd64" - - tag: "${{ needs.variables.outputs.tag }}-ubi-mktpl" - target_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}-ubi-mktpl" - image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic-dos/nginx-plus-ingress" - target_image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress" - platforms: "linux/amd64" - - tag: "${{ needs.variables.outputs.tag }}-mktpl" - target_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}-mktpl" - image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic-dos/nginx-plus-ingress" - target_image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress" - platforms: "linux/amd64" - - tag: "${{ needs.variables.outputs.tag }}" - target_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}" - image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic-dos-nap/nginx-plus-ingress" - target_image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress" - platforms: "linux/amd64" - - tag: "${{ needs.variables.outputs.tag }}-ubi" - target_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}-ubi" - image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic-dos-nap/nginx-plus-ingress" - target_image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress" - platforms: "linux/amd64" - - tag: "${{ needs.variables.outputs.tag }}-ubi-mktpl" - target_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}-ubi-mktpl" - image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic-dos-nap/nginx-plus-ingress" - target_image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress" - platforms: "linux/amd64" - - tag: "${{ needs.variables.outputs.tag }}-mktpl" - target_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}-mktpl" - image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic-dos-nap/nginx-plus-ingress" - target_image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress" - platforms: "linux/amd64" - uses: ./.github/workflows/patch-image.yml - with: - platforms: ${{ matrix.platforms }} - image: ${{ matrix.image }} - tag: ${{ matrix.tag }} - ic_version: ${{ needs.variables.outputs.tag }} - target_image: ${{ matrix.target_image }} - target_tag: ${{ matrix.target_tag }} + target_tag: ${{ matrix.source_os == 'debian' && format('{0}-{1}', needs.variables.outputs.tag, needs.variables.outputs.date) || format('{0}-{1}-{2}', needs.variables.outputs.tag, needs.variables.outputs.date, matrix.source_os) }} permissions: contents: read id-token: write @@ -215,7 +77,7 @@ jobs: release-oss-internal: name: "Publish Docker OSS ${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }} to internal release Registries" - needs: [variables, patch-oss-images] + needs: [variables, patch-images] uses: ./.github/workflows/oss-release.yml with: gcr_release_registry: true @@ -225,6 +87,7 @@ jobs: github_public_registry: false source_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}" target_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}" + branch: "release-${{ needs.variables.outputs.short_tag }}" dry_run: ${{ inputs.dry_run || false }} permissions: contents: read @@ -232,8 +95,8 @@ jobs: secrets: inherit release-oss-public: - name: Publish Docker OSS ${{ needs.variables.outputs.tag }} to Public Registries - needs: [variables, patch-oss-images] + name: Publish Docker OSS ${{ matrix.tag }} to Public Registries + needs: [variables, patch-images] strategy: fail-fast: false matrix: @@ -251,6 +114,7 @@ jobs: github_public_registry: true source_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}" target_tag: ${{ matrix.tag }} + branch: "release-${{ needs.variables.outputs.short_tag }}" dry_run: ${{ inputs.dry_run || false }} permissions: contents: read @@ -259,8 +123,8 @@ jobs: secrets: inherit release-plus-nginx-gcr: - name: Publish Docker Plus ${{ needs.variables.outputs.tag }} to NGINX & GCR Marketplace registries - needs: [variables, patch-plus-images, patch-plus-nap-images] + name: Publish Docker Plus ${{ matrix.tag }} to NGINX & GCR Marketplace registries + needs: [variables, patch-images] strategy: fail-fast: false matrix: @@ -278,6 +142,7 @@ jobs: az_mktpl_registry: false source_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}" target_tag: ${{ matrix.tag }} + branch: "release-${{ needs.variables.outputs.short_tag }}" dry_run: ${{ inputs.dry_run || false }} permissions: contents: read @@ -286,7 +151,7 @@ jobs: release-plus-azure-ecr-marketplace: name: Publish Docker Plus ${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }} to Azure & ECR Marketplace registries - needs: [variables, patch-plus-images, patch-plus-nap-images] + needs: [variables, patch-images] uses: ./.github/workflows/plus-release.yml with: nginx_registry: false @@ -296,6 +161,7 @@ jobs: az_mktpl_registry: true source_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}" target_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}" + branch: "release-${{ needs.variables.outputs.short_tag }}" dry_run: ${{ inputs.dry_run || false }} permissions: contents: read @@ -304,7 +170,7 @@ jobs: release-plus-internal: name: Publish Docker Plus ${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }} to internal release Registries - needs: [variables, patch-plus-images, patch-plus-nap-images] + needs: [variables, patch-images] uses: ./.github/workflows/plus-release.yml with: nginx_registry: false @@ -314,6 +180,7 @@ jobs: az_mktpl_registry: false source_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}" target_tag: "${{ needs.variables.outputs.tag }}-${{ needs.variables.outputs.date }}" + branch: "release-${{ needs.variables.outputs.short_tag }}" dry_run: ${{ inputs.dry_run || false }} permissions: contents: read