From fb834219e8bcae4536ac2d735254d4b052a6d65d Mon Sep 17 00:00:00 2001 From: Luiz Carvalho Date: Fri, 30 Aug 2024 14:04:13 -0400 Subject: [PATCH] Update to go 1.22 Ref: EC-598 Signed-off-by: Luiz Carvalho --- .tool-versions | 2 +- Dockerfile | 2 +- Dockerfile.dist | 6 ++++-- acceptance/go.mod | 2 +- go.mod | 2 +- tools/go.mod | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.tool-versions b/.tool-versions index 0e6ce8755..009efa3da 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -golang 1.21.9 +golang 1.22.5 diff --git a/Dockerfile b/Dockerfile index bc53b42ec..99488580c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ ## Build -FROM docker.io/library/golang:1.21 AS build +FROM docker.io/library/golang:1.22 AS build ARG TARGETOS ARG TARGETARCH diff --git a/Dockerfile.dist b/Dockerfile.dist index 131e1bc65..643f49a0a 100644 --- a/Dockerfile.dist +++ b/Dockerfile.dist @@ -17,9 +17,11 @@ ## Build # This works fine but will produce an EC violation -# FROM docker.io/library/golang:1.21 AS build +# FROM docker.io/library/golang:1.22 AS build -FROM registry.access.redhat.com/ubi9/go-toolset:1.21@sha256:ae17d73e70a966f39ef4dfca74241e3ca4374cd1198b02c30ea0748b8dcc83a6 AS build +# Ideally, use the official image from Red Hat, but a 1.22 release does not yet exist. +# FROM registry.access.redhat.com/ubi9/go-toolset:1.21@sha256:ae17d73e70a966f39ef4dfca74241e3ca4374cd1198b02c30ea0748b8dcc83a6 AS build +FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.22@sha256:859b38e6f53f49350402ca0a8dc342402f0afd8434c2f8984a7a3e714173cdca AS build ARG TARGETOS ARG TARGETARCH diff --git a/acceptance/go.mod b/acceptance/go.mod index 8092b015f..3a2671e5c 100644 --- a/acceptance/go.mod +++ b/acceptance/go.mod @@ -1,6 +1,6 @@ module github.com/enterprise-contract/ec-cli/acceptance -go 1.21.4 +go 1.22.5 require ( cuelang.org/go v0.9.2 diff --git a/go.mod b/go.mod index 398037546..19212b732 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/enterprise-contract/ec-cli -go 1.21.9 +go 1.22.5 require ( cuelang.org/go v0.9.2 diff --git a/tools/go.mod b/tools/go.mod index b5124b059..29d4c9be7 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -1,6 +1,6 @@ module github.com/enterprise-contract/ec-cli/tools -go 1.21.4 +go 1.22.5 require ( github.com/daixiang0/gci v0.13.4