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

OCPBUGS-10475: UPSTREAM: <carry>: Fix GOARCH in OpenShift build #37

Merged
merged 2 commits into from
Mar 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile.openshift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.19-openshift-4.14 AS builder
WORKDIR /go/src/github.com/kubernetes-sigs/aws-efs-csi-driver
COPY . .
RUN make
RUN make bin/aws-efs-csi-driver

# Use a base image with aws-efs-utils installed
FROM registry.ci.openshift.org/ocp/4.14:aws-efs-utils-base
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ word-hyphen = $(word $2,$(subst -, ,$1))
.PHONY: linux/$(ARCH) bin/aws-efs-csi-driver
linux/$(ARCH): bin/aws-efs-csi-driver
bin/aws-efs-csi-driver: | bin
CGO_ENABLED=0 GOOS=linux GOARCH=$(ARCH) go build -mod=vendor -ldflags ${LDFLAGS} -o bin/aws-efs-csi-driver ./cmd/
# OpenShift: <carry>: do not overwrite GOARCH, use the one provided by the builder.
@echo GOARCH:${GOARCH}
CGO_ENABLED=0 GOOS=linux go build -mod=vendor -ldflags ${LDFLAGS} -o bin/aws-efs-csi-driver ./cmd/

.PHONY: all
all: all-image-docker
Expand Down