From c3cee3940ddfa1c718633168333140a4b7f00fec Mon Sep 17 00:00:00 2001 From: Sascha Schwarze Date: Sat, 5 Aug 2023 22:14:53 +0200 Subject: [PATCH] Update to Golang 1.20 --- .github/workflows/ci.yml | 6 +++--- .github/workflows/mirror-images.yaml | 1 + .github/workflows/nightly.yaml | 2 +- .github/workflows/release.yaml | 2 +- .github/workflows/verify.yaml | 2 +- HACK.md | 2 +- docs/buildstrategies.md | 2 +- go.mod | 2 +- samples/build/build_ko_cr.yaml | 2 +- samples/buildstrategy/ko/buildstrategy_ko_cr.yaml | 2 +- 10 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cb9ba4355b..907b268944 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: - name: Install Go uses: actions/setup-go@v3 with: - go-version: '1.19.x' + go-version: '1.20.x' cache: true check-latest: true - name: Build @@ -67,7 +67,7 @@ jobs: - name: Install Go uses: actions/setup-go@v3 with: - go-version: '1.19.x' + go-version: '1.20.x' cache: true check-latest: true - name: Install Ko @@ -129,7 +129,7 @@ jobs: - name: Install Go uses: actions/setup-go@v3 with: - go-version: '1.19.x' + go-version: '1.20.x' cache: true check-latest: true - name: Install kubectl diff --git a/.github/workflows/mirror-images.yaml b/.github/workflows/mirror-images.yaml index e706c5bd20..6966aa31d0 100644 --- a/.github/workflows/mirror-images.yaml +++ b/.github/workflows/mirror-images.yaml @@ -22,6 +22,7 @@ jobs: library/golang:1.17 \ library/golang:1.18 \ library/golang:1.19 \ + library/golang:1.20 \ library/maven:3-jdk-8-openj9 \ library/node:12 \ library/node:14 \ diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index b405dc7e2e..017e74ef6d 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: '1.19.x' + go-version: '1.20.x' cache: true check-latest: true diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0da0e61f81..f54c13569a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -30,7 +30,7 @@ jobs: fetch-depth: 0 # Fetch all history, needed for release note generation. - uses: actions/setup-go@v3 with: - go-version: '1.19.x' + go-version: '1.20.x' cache: true check-latest: true diff --git a/.github/workflows/verify.yaml b/.github/workflows/verify.yaml index 0c583b35e7..8463222f6c 100644 --- a/.github/workflows/verify.yaml +++ b/.github/workflows/verify.yaml @@ -25,7 +25,7 @@ jobs: - name: Install Go uses: actions/setup-go@v3 with: - go-version: '1.19.x' + go-version: '1.20.x' cache: true check-latest: true cache-dependency-path: go/src/github.com/shipwright-io/build diff --git a/HACK.md b/HACK.md index 7e398b22b2..dc5697eb31 100644 --- a/HACK.md +++ b/HACK.md @@ -41,7 +41,7 @@ In the near future, the above would be setup by the controller. make clean && make build ``` -* This project uses Golang 1.19+ and controller-gen v0.10.0. +* This project uses Golang 1.20 and controller-gen v0.10.0. * The controllers create/watch Tekton objects. # Testing diff --git a/docs/buildstrategies.md b/docs/buildstrategies.md index acaee6b038..77ed2ebfc7 100644 --- a/docs/buildstrategies.md +++ b/docs/buildstrategies.md @@ -212,7 +212,7 @@ The build strategy provides the following parameters that you can set in a Build | Parameter | Description | Default | | -- | -- | -- | | `go-flags` | Value for the GOFLAGS environment variable. | Empty | -| `go-version` | Version of Go, must match a tag from [the golang image](https://hub.docker.com/_/golang?tab=tags) | `1.19` | +| `go-version` | Version of Go, must match a tag from [the golang image](https://hub.docker.com/_/golang?tab=tags) | `1.20` | | `ko-version` | Version of ko, must be either `latest` for the newest release, or a [ko release name](https://github.com/ko-build/ko/releases) | `latest` | | `package-directory` | The directory inside the context directory containing the main package. | `.` | | `target-platform` | Target platform to be built. For example: `linux/arm64`. Multiple platforms can be provided separated by comma, for example: `linux/arm64,linux/amd64`. The value `all` will build all platforms supported by the base image. The value `current` will build the platform on which the build runs. | `current` | diff --git a/go.mod b/go.mod index 7dabae9e24..f458a946a1 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/shipwright-io/build -go 1.19 +go 1.20 require ( github.com/docker/cli v24.0.5+incompatible diff --git a/samples/build/build_ko_cr.yaml b/samples/build/build_ko_cr.yaml index e0791800e3..93af59096d 100644 --- a/samples/build/build_ko_cr.yaml +++ b/samples/build/build_ko_cr.yaml @@ -10,7 +10,7 @@ spec: - name: go-flags value: "-v -mod=vendor -ldflags=-w" - name: go-version - value: "1.19" + value: "1.20" - name: package-directory value: ./cmd/shipwright-build-controller source: diff --git a/samples/buildstrategy/ko/buildstrategy_ko_cr.yaml b/samples/buildstrategy/ko/buildstrategy_ko_cr.yaml index 9fb968cd0c..e98b0aede1 100644 --- a/samples/buildstrategy/ko/buildstrategy_ko_cr.yaml +++ b/samples/buildstrategy/ko/buildstrategy_ko_cr.yaml @@ -10,7 +10,7 @@ spec: default: "" - name: go-version description: "Version of Go, must match a tag from https://hub.docker.com/_/golang?tab=tags" - default: "1.19" + default: "1.20" - name: ko-version description: "Version of ko, must be either 'latest', or a release name from https://github.com/ko-build/ko/releases" default: latest