Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Golang v1.20 #57

Merged
merged 3 commits into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .ci-operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build_root_image:
namespace: openshift
name: release
tag: rhel-8-release-golang-1.20-openshift-4.14
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ FROM quay.io/centos/centos:stream8 AS builder
RUN dnf install -y golang git \
&& dnf clean all -y

# Ensure correct Go version
ENV GO_VERSION=1.18
RUN go install golang.org/dl/go${GO_VERSION}@latest \
&& ~/go/bin/go${GO_VERSION} download \
&& /bin/cp -f ~/go/bin/go${GO_VERSION} /usr/bin/go \
&& go version

WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum

# Ensure correct Go version
RUN export GO_VERSION=$(grep -E "go [[:digit:]]\.[[:digit:]][[:digit:]]" go.mod | awk '{print $2}') && \
go install golang.org/dl/go${GO_VERSION}@latest && \
~/go/bin/go${GO_VERSION} download && \
/bin/cp -f ~/go/bin/go${GO_VERSION} /usr/bin/go && \
go version

# Copy the go source
COPY main.go main.go
COPY api/ api/
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/medik8s/fence-agents-remediation

go 1.18
go 1.20

require (
github.com/go-logr/logr v1.2.4
Expand Down