Skip to content

Commit

Permalink
build: Remove patch release from registry.access.redhat.com/ubi8/go-t…
Browse files Browse the repository at this point in the history
…oolset

There are now registry.access.redhat.com/ubi8/go-toolset:1.18 images
which point to the latest go-toolset image. It's easier to use this as
the go-toolset usually lagged behind latest go releases, so the patch
version number had to be adjusted by hand.
  • Loading branch information
cfergeau authored and openshift-merge-robot committed Feb 22, 2023
1 parent c199fd7 commit 6149936
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion images/build-e2e/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.access.redhat.com/ubi8/go-toolset:1.17.7 as builder
FROM registry.access.redhat.com/ubi8/go-toolset:1.17 as builder

USER root
WORKDIR /workspace
Expand Down
2 changes: 1 addition & 1 deletion images/build-integration/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.access.redhat.com/ubi8/go-toolset:1.17.7 as builder
FROM registry.access.redhat.com/ubi8/go-toolset:1.17 as builder

USER root
WORKDIR /workspace
Expand Down
7 changes: 3 additions & 4 deletions update-go-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ set -euo pipefail
# This requires yq and jq in addition to fairly standard shell tools (curl, grep, sed, ...)

golang_base_version=$1
latest_version=$(curl --location --silent 'https://go.dev/dl/?mode=json&include=all' | jq -r '.[].files[].version' |uniq | sed -e 's/go//' |sort -V |grep ${golang_base_version}|tail -1)
echo "Updating golang version to $latest_version"
echo "Updating golang version to $golang_base_version"

go mod edit -go ${golang_base_version}
go mod edit -go ${golang_base_version} tools/go.mod
sed -i "s,^FROM registry.ci.openshift.org/openshift/release:golang-1\... AS builder\$,FROM registry.ci.openshift.org/openshift/release:golang-${golang_base_version} AS builder," images/openshift-ci/Dockerfile
sed -i "s,^FROM registry.access.redhat.com/ubi8/go-toolset:[.0-9]\+ as builder\$,FROM registry.access.redhat.com/ubi8/go-toolset:${latest_version} as builder," images/build-e2e/Dockerfile
sed -i "s,^FROM registry.access.redhat.com/ubi8/go-toolset:[.0-9]\+ as builder\$,FROM registry.access.redhat.com/ubi8/go-toolset:${latest_version} as builder," images/build-integration/Dockerfile
sed -i "s,^FROM registry.access.redhat.com/ubi8/go-toolset:[.0-9]\+ as builder\$,FROM registry.access.redhat.com/ubi8/go-toolset:${golang_base_version} as builder," images/build-e2e/Dockerfile
sed -i "s,^FROM registry.access.redhat.com/ubi8/go-toolset:[.0-9]\+ as builder\$,FROM registry.access.redhat.com/ubi8/go-toolset:${golang_base_version} as builder," images/build-integration/Dockerfile
for f in .github/workflows/*.yml; do
yq eval --inplace ".jobs.build.strategy.matrix.go[0] = ${golang_base_version}" "$f";
done

0 comments on commit 6149936

Please sign in to comment.