From 2feec3198bf416b1fa62d10a6f9deaca2b23c340 Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Mon, 20 Nov 2023 17:09:30 +0200 Subject: [PATCH] Build with Go 1.21 Signed-off-by: Stefan Prodan --- .github/workflows/cifuzz.yaml | 2 +- .github/workflows/e2e.yaml | 4 ++-- .github/workflows/scan.yaml | 2 +- .github/workflows/tests.yaml | 4 ++-- .github/workflows/verify.yaml | 2 +- DEVELOPMENT.md | 4 ++-- Dockerfile | 2 +- Makefile | 2 +- go.mod | 2 +- tests/fuzz/Dockerfile.builder | 4 ++-- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/cifuzz.yaml b/.github/workflows/cifuzz.yaml index 36126338..b67a0847 100644 --- a/.github/workflows/cifuzz.yaml +++ b/.github/workflows/cifuzz.yaml @@ -21,7 +21,7 @@ jobs: - name: Setup Go uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: - go-version: 1.20.x + go-version: 1.21.x cache-dependency-path: | **/go.sum **/go.mod diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index ac70800a..6e71bb0d 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -24,7 +24,7 @@ jobs: - name: Setup Go uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: - go-version: 1.20.x + go-version: 1.21.x cache-dependency-path: | **/go.sum **/go.mod @@ -59,7 +59,7 @@ jobs: - name: Setup Go uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: - go-version: 1.20.x + go-version: 1.21.x cache-dependency-path: | **/go.sum **/go.mod diff --git a/.github/workflows/scan.yaml b/.github/workflows/scan.yaml index 61ddcb8b..cd2a2379 100644 --- a/.github/workflows/scan.yaml +++ b/.github/workflows/scan.yaml @@ -35,7 +35,7 @@ jobs: - name: Setup Go uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: - go-version: 1.20.x + go-version: 1.21.x cache-dependency-path: | **/go.sum **/go.mod diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 24d82408..685ff861 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -25,7 +25,7 @@ jobs: - name: Setup Go uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: - go-version: 1.20.x + go-version: 1.21.x cache-dependency-path: | **/go.sum **/go.mod @@ -46,7 +46,7 @@ jobs: - name: Setup Go uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: - go-version: 1.20.x + go-version: 1.21.x cache-dependency-path: | **/go.sum **/go.mod diff --git a/.github/workflows/verify.yaml b/.github/workflows/verify.yaml index d022eb17..744c595e 100644 --- a/.github/workflows/verify.yaml +++ b/.github/workflows/verify.yaml @@ -25,7 +25,7 @@ jobs: - name: Setup Go uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: - go-version: 1.20.x + go-version: 1.21.x cache-dependency-path: | **/go.sum **/go.mod diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 15d0aa68..072e7232 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -15,7 +15,7 @@ There are a number of dependencies required to be able to run the controller and In addition to the above, the following dependencies are also used by some of the `make` targets: -- `controller-gen` (v0.7.0) +- `controller-gen` (v0.12.0) - `gen-crd-api-reference-docs` (v0.3.0) - `setup-envtest` (latest) @@ -24,7 +24,7 @@ If any of the above dependencies are not present on your system, the first invoc ## How to run the test suite Prerequisites: -* Go >= 1.18 +* Go >= 1.21 You can run the test suite by simply doing diff --git a/Dockerfile b/Dockerfile index 58df2fb6..b4a8c28a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ ARG BASE_VARIANT=alpine -ARG GO_VERSION=1.20 +ARG GO_VERSION=1.21 ARG XX_VERSION=1.2.1 FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx diff --git a/Makefile b/Makefile index 666d61c6..749d22bd 100644 --- a/Makefile +++ b/Makefile @@ -119,7 +119,7 @@ api-docs: gen-crd-api-reference-docs ## Generate API reference documentation tidy: ## Run go mod tidy cd api; rm -f go.sum; go mod tidy -compat=1.20 - rm -f go.sum; go mod tidy -compat=1.20 + rm -f go.sum; go mod tidy -compat=1.21 fmt: ## Run go fmt against code go fmt ./... diff --git a/go.mod b/go.mod index d7c884e7..4051b303 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/fluxcd/source-controller -go 1.20 +go 1.21 replace github.com/fluxcd/source-controller/api => ./api diff --git a/tests/fuzz/Dockerfile.builder b/tests/fuzz/Dockerfile.builder index 5eafa0e5..7fabaee7 100644 --- a/tests/fuzz/Dockerfile.builder +++ b/tests/fuzz/Dockerfile.builder @@ -1,9 +1,9 @@ FROM gcr.io/oss-fuzz-base/base-builder-go -RUN wget https://go.dev/dl/go1.20.5.linux-amd64.tar.gz \ +RUN wget https://go.dev/dl/go1.21.3.linux-amd64.tar.gz \ && mkdir temp-go \ && rm -rf /root/.go/* \ - && tar -C temp-go/ -xzf go1.20.5.linux-amd64.tar.gz \ + && tar -C temp-go/ -xzf go1.21.3.linux-amd64.tar.gz \ && mv temp-go/go/* /root/.go/ ENV SRC=$GOPATH/src/github.com/fluxcd/source-controller