Skip to content

Commit

Permalink
Upgrade to Go 1.21 (#1440)
Browse files Browse the repository at this point in the history
Signed-off-by: Douglas Camata <[email protected]>
  • Loading branch information
douglascamata authored May 18, 2024
1 parent a7fbc97 commit e29ed2a
Show file tree
Hide file tree
Showing 19 changed files with 59 additions and 22 deletions.
6 changes: 3 additions & 3 deletions cicd-scripts/run-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ if command -v ginkgo &>/dev/null; then
else
# just for Prow KinD vm
# uninstall old go version(1.16) and install new version
wget -nv https://go.dev/dl/go1.20.4.linux-amd64.tar.gz
wget -nv https://go.dev/dl/go1.21.10.linux-amd64.tar.gz
if command -v sudo >/dev/null 2>&1; then
sudo rm -fr /usr/local/go
sudo tar -C /usr/local -xzf go1.20.4.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.21.10.linux-amd64.tar.gz
# else
# rm -fr /usr/local/go
# tar -C /usr/local -xzf go1.20.4.linux-amd64.tar.gz
# tar -C /usr/local -xzf go1.21.10.linux-amd64.tar.gz
fi
go install github.com/onsi/ginkgo/ginkgo@latest
GINKGO_CMD="$(go env GOPATH)/bin/ginkgo"
Expand Down
2 changes: 1 addition & 1 deletion collectors/metrics/Containerfile.operator
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright Contributors to the Open Cluster Management project
# Licensed under the Apache License 2.0

FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.20 AS builder
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.21 AS builder

WORKDIR /workspace
COPY go.sum go.mod ./
Expand Down
2 changes: 1 addition & 1 deletion collectors/metrics/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright Contributors to the Open Cluster Management project

FROM registry.ci.openshift.org/stolostron/builder:go1.20-linux AS builder
FROM registry.ci.openshift.org/stolostron/builder:go1.21-linux AS builder

WORKDIR /workspace
COPY go.sum go.mod ./
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/stolostron/multicluster-observability-operator

go 1.20
go 1.21

require (
github.com/IBM/controller-filtered-cache v0.3.6
Expand Down
39 changes: 39 additions & 0 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion loaders/dashboards/Containerfile.operator
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright Contributors to the Open Cluster Management project
# Licensed under the Apache License 2.0

FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.20 AS builder
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.21 AS builder

WORKDIR /workspace
COPY go.sum go.mod ./loaders/dashboards ./
Expand Down
2 changes: 1 addition & 1 deletion loaders/dashboards/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright Contributors to the Open Cluster Management project

FROM registry.ci.openshift.org/stolostron/builder:go1.20-linux AS builder
FROM registry.ci.openshift.org/stolostron/builder:go1.21-linux AS builder

WORKDIR /workspace
COPY go.sum go.mod ./loaders/dashboards ./
Expand Down
2 changes: 1 addition & 1 deletion operators/endpointmetrics/Containerfile.operator
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) 2021 Red Hat, Inc.
# Copyright Contributors to the Open Cluster Management project.
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.20 AS builder
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.21 AS builder

WORKDIR /workspace
COPY go.sum go.mod ./
Expand Down
2 changes: 1 addition & 1 deletion operators/endpointmetrics/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) 2021 Red Hat, Inc.
# Copyright Contributors to the Open Cluster Management project.
FROM registry.ci.openshift.org/stolostron/builder:go1.20-linux AS builder
FROM registry.ci.openshift.org/stolostron/builder:go1.21-linux AS builder

WORKDIR /workspace
COPY go.sum go.mod ./
Expand Down
2 changes: 1 addition & 1 deletion operators/multiclusterobservability/Containerfile.operator
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright Contributors to the Open Cluster Management project
# Licensed under the Apache License 2.0

FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.20 AS builder
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.21 AS builder

WORKDIR /workspace
COPY go.sum go.mod ./
Expand Down
2 changes: 1 addition & 1 deletion operators/multiclusterobservability/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright Contributors to the Open Cluster Management project

FROM registry.ci.openshift.org/stolostron/builder:go1.20-linux AS builder
FROM registry.ci.openshift.org/stolostron/builder:go1.21-linux AS builder


WORKDIR /workspace
Expand Down
2 changes: 1 addition & 1 deletion proxy/Containerfile.operator
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright Contributors to the Open Cluster Management project

FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.20 AS builder
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.21 AS builder

WORKDIR /workspace
COPY go.sum go.mod ./
Expand Down
2 changes: 1 addition & 1 deletion proxy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright Contributors to the Open Cluster Management project

FROM registry.ci.openshift.org/stolostron/builder:go1.20-linux AS builder
FROM registry.ci.openshift.org/stolostron/builder:go1.21-linux AS builder

WORKDIR /workspace
COPY go.sum go.mod ./
Expand Down
2 changes: 1 addition & 1 deletion tests/Containerfile.operator
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright Contributors to the Open Cluster Management project
# Licensed under the Apache License 2.0

FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.20 AS builder
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.21 AS builder

WORKDIR /workspace
# copy go tests into build image
Expand Down
2 changes: 1 addition & 1 deletion tests/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.ci.openshift.org/stolostron/builder:go1.20-linux AS builder
FROM registry.ci.openshift.org/stolostron/builder:go1.21-linux AS builder

WORKDIR /workspace
# copy go tests into build image
Expand Down
3 changes: 1 addition & 2 deletions tools/simulator/alert-forward/Containerfile.operator
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright Contributors to the Open Cluster Management project
# Licensed under the Apache License 2.0

FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.20 AS builder
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.21 AS builder

WORKDIR /workspace
COPY go.sum go.mod ./
Expand All @@ -22,4 +22,3 @@ COPY tools/simulator/alert-forward/alerts.json /tmp/
USER ${USER_UID}

ENTRYPOINT ["/usr/local/bin/alert-forwarder"]

3 changes: 1 addition & 2 deletions tools/simulator/alert-forward/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright Contributors to the Open Cluster Management project

FROM registry.ci.openshift.org/stolostron/builder:go1.20-linux AS builder
FROM registry.ci.openshift.org/stolostron/builder:go1.21-linux AS builder

WORKDIR /workspace
COPY go.sum go.mod ./
Expand All @@ -21,4 +21,3 @@ COPY tools/simulator/alert-forward/alerts.json /tmp/
USER ${USER_UID}

ENTRYPOINT ["/usr/local/bin/alert-forwarder"]

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright Contributors to the Open Cluster Management project
# Licensed under the Apache License 2.0

FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.20 AS builder
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.21 AS builder

RUN GOBIN=/usr/local/bin go install github.com/brancz/gojsontoyaml@latest

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.ci.openshift.org/stolostron/builder:go1.20-linux AS builder
FROM registry.ci.openshift.org/stolostron/builder:go1.21-linux AS builder

RUN GOBIN=/usr/local/bin go install github.com/brancz/gojsontoyaml@latest

Expand Down

0 comments on commit e29ed2a

Please sign in to comment.