From c86c71030aa3da808273c6744deffdcb8af6029e Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Thu, 21 Mar 2024 11:44:48 -0700 Subject: [PATCH] Add support for s390x and ppc64le Problem: I want to be able to run NGF on my IBM Z or PowerPC, but there aren't any binaries or Docker images available Solution: Build binaries and Docker images for s390x and ppc64le. --- .github/workflows/ci.yml | 28 +++++++++++++++++++++------- .goreleaser.yml | 12 +++++++----- 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48c530978b..62db637c02 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -165,14 +165,14 @@ jobs: path: ${{ github.workspace }}/dist key: nginx-gateway-fabric-${{ github.run_id }}-${{ github.run_number }} - build: - name: Build Image + build-oss: + name: Build OSS images needs: [vars, binary] strategy: fail-fast: false matrix: - image: [ngf, nginx, plus] - platforms: ["linux/arm64, linux/amd64"] + image: [ngf, nginx] + platforms: ["linux/arm64, linux/amd64, linux/s390x, linux/ppc64le"] uses: ./.github/workflows/build.yml with: image: ${{ matrix.image }} @@ -184,9 +184,23 @@ jobs: id-token: write # for docker/login to login to NGINX registry secrets: inherit + build-plus: + name: Build Plus images + needs: [vars, binary] + uses: ./.github/workflows/build.yml + with: + image: plus + platforms: "linux/arm64, linux/amd64" + permissions: + contents: read # for docker/build-push-action to read repo content + security-events: write # for github/codeql-action/upload-sarif to upload SARIF results + packages: write # for docker/build-push-action to push to GHCR + id-token: write # for docker/login to login to NGINX registry + secrets: inherit + functional-tests: name: Functional tests - needs: [vars, build] + needs: [vars, build-oss, build-plus] strategy: fail-fast: false matrix: @@ -201,7 +215,7 @@ jobs: conformance-tests: name: Conformance tests - needs: [vars, build] + needs: [vars, build-oss, build-plus] strategy: fail-fast: false matrix: @@ -219,7 +233,7 @@ jobs: helm-tests: name: Helm Tests runs-on: ubuntu-22.04 - needs: [vars, build] + needs: [vars, build-oss] steps: - name: Checkout Repository uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 diff --git a/.goreleaser.yml b/.goreleaser.yml index f0f9e335c4..86c1d5671b 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -8,6 +8,8 @@ builds: goarch: - amd64 - arm64 + - s390x + - ppc64le flags: - -trimpath gcflags: @@ -38,13 +40,13 @@ sboms: blobs: - provider: azblob - bucket: '{{.Env.AZURE_BUCKET_NAME}}' + bucket: "{{.Env.AZURE_BUCKET_NAME}}" signs: - cmd: cosign artifacts: checksum output: true - certificate: '${artifact}.pem' + certificate: "${artifact}.pem" args: - sign-blob - "--output-signature=${signature}" @@ -55,14 +57,14 @@ signs: announce: slack: enabled: true - channel: '#announcements' - message_template: 'NGINX Gateway Fabric {{ .Tag }} is out! Check it out: {{ .ReleaseURL }}' + channel: "#announcements" + message_template: "NGINX Gateway Fabric {{ .Tag }} is out! Check it out: {{ .ReleaseURL }}" milestones: - close: true snapshot: - name_template: 'edge' + name_template: "edge" before: hooks: