Skip to content
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
2 changes: 1 addition & 1 deletion .ci-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build_root_image:
name: builder
namespace: ocp
tag: rhel-8-golang-1.20-openshift-4.14
tag: rhel-9-golang-1.24-openshift-4.16
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@ RUN yum --assumeyes install \
&& yum clean all;

### Build backplane-cli
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.23 as bp-cli-builder
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.24 as bp-cli-builder


# Configure the env

RUN go env -w GOTOOLCHAIN=go1.23.6+auto
RUN go env -w GOTOOLCHAIN=go1.24.4+auto

#Environment variables
ENV GOOS=linux GO111MODULE=on GOPROXY=https://proxy.golang.org
ENV GOBIN=/gobin GOPATH=/usr/src/go CGO_ENABLED=0
ENV GOTOOLCHAIN=go1.24.4+auto

# Directory for the binary
RUN mkdir /out
Expand All @@ -34,8 +35,10 @@ RUN cp ./ocm-backplane /out
RUN chmod -R +x /out

### Build dependencies
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.23 as dep-builder
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.24 as dep-builder

# Ensure we can use Go 1.24.4
ENV GOTOOLCHAIN=go1.24.4+auto

ARG GITHUB_URL="https://api.github.com"
ARG GITHUB_TOKEN=""
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ OUTPUT_DIR :=_output
CROSS_BUILD_BINDIR :=$(OUTPUT_DIR)/bin

build: clean
go build -o ocm-backplane ./cmd/ocm-backplane || exit 1
env -u GOTOOLCHAIN GOTOOLCHAIN=go1.24.4+auto go build -o ocm-backplane ./cmd/ocm-backplane || exit 1

build-static: clean
go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o ocm-backplane ./cmd/ocm-backplane || exit 1
env -u GOTOOLCHAIN GOTOOLCHAIN=go1.24.4+auto go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o ocm-backplane ./cmd/ocm-backplane || exit 1

install:
go install ./cmd/ocm-backplane
GOTOOLCHAIN=go1.24.4+auto go install ./cmd/ocm-backplane

clean:
rm -f ocm-backplane
Expand All @@ -82,18 +82,18 @@ release-with-note: ensure-goreleaser
goreleaser release --rm-dist --release-notes="$(NOTE)"

test:
go test -v $(TESTOPTS) ./...
env -u GOTOOLCHAIN GOTOOLCHAIN=go1.24.4+auto go test -v $(TESTOPTS) ./...

.PHONY: coverage
coverage:
hack/codecov.sh

cross-build-darwin-amd64:
+@GOOS=darwin GOARCH=amd64 go build $(GO_BUILD_FLAGS_DARWIN) -o $(CROSS_BUILD_BINDIR)/ocm-backplane_darwin_amd64 ./cmd/ocm-backplane
+@GOOS=darwin GOARCH=amd64 GOTOOLCHAIN=go1.24.4+auto go build $(GO_BUILD_FLAGS_DARWIN) -o $(CROSS_BUILD_BINDIR)/ocm-backplane_darwin_amd64 ./cmd/ocm-backplane
.PHONY: cross-build-darwin-amd64

cross-build-linux-amd64:
+@GOOS=linux GOARCH=amd64 go build $(GO_BUILD_FLAGS_LINUX_CROSS) -o $(CROSS_BUILD_BINDIR)/ocm-backplane_linux_amd64 ./cmd/ocm-backplane
+@GOOS=linux GOARCH=amd64 GOTOOLCHAIN=go1.24.4+auto go build $(GO_BUILD_FLAGS_LINUX_CROSS) -o $(CROSS_BUILD_BINDIR)/ocm-backplane_linux_amd64 ./cmd/ocm-backplane
.PHONY: cross-build-linux-amd64

cross-build: cross-build-darwin-amd64 cross-build-linux-amd64
Expand All @@ -106,7 +106,7 @@ clean-cross-build:

.PHONY: generate
generate:
go generate ./...
GOTOOLCHAIN=go1.24.4+auto go generate ./...

.PHONY: mock-gen
mock-gen:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ Wait for the release repository PR to be merged by the CI bot.
Update the Go version in the Backplane CLI Dockerfile and verify CI builds:

```
FROM golang:1.21 # Update version to match release PR
FROM golang:1.24.4 # Update version to match release PR
```
Example Implementation: PR [#636](https://github.com/openshift/backplane-cli/pull/636): OSD-28717 Fix build failures
Update the dockerfile of backplane-cli with the latest go version and check if build passes.
Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/openshift/backplane-cli

go 1.24.0

toolchain go1.24.1
go 1.24.4

require (
github.com/Masterminds/semver v1.5.0
Expand Down