diff --git a/openshift/Makefile b/openshift/Makefile index adf542550..3c4c1204b 100644 --- a/openshift/Makefile +++ b/openshift/Makefile @@ -37,3 +37,8 @@ test-e2e: ## Run the e2e tests. $(DIR)/operator-controller/build-test-registry.sh $(E2E_REGISTRY_NAMESPACE) $(E2E_REGISTRY_NAME) $(E2E_REGISTRY_IMAGE) cd $(DIR)/../; \ go test $(DOWNSTREAM_E2E_FLAGS) ./test/e2e/...; + +export GIT_COMMIT := ${SOURCE_GIT_COMMIT} +PHONY: go-build-local +go-build-local: + $(MAKE) -n -f Makefile go-build-local diff --git a/openshift/catalogd.Dockerfile b/openshift/catalogd.Dockerfile index 2b29ff0cd..e8976f676 100644 --- a/openshift/catalogd.Dockerfile +++ b/openshift/catalogd.Dockerfile @@ -1,7 +1,8 @@ FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.23-openshift-4.19 AS builder + WORKDIR /build COPY . . -RUN make go-build-local +RUN make -f openshift/Makefile go-build-local FROM registry.ci.openshift.org/ocp/4.19:base-rhel9 USER 1001 diff --git a/openshift/operator-controller.Dockerfile b/openshift/operator-controller.Dockerfile index 2701bda03..22531a334 100644 --- a/openshift/operator-controller.Dockerfile +++ b/openshift/operator-controller.Dockerfile @@ -1,7 +1,8 @@ FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.23-openshift-4.19 AS builder + WORKDIR /build COPY . . -RUN make go-build-local +RUN make -f openshift/Makefile go-build-local FROM registry.ci.openshift.org/ocp/4.19:base-rhel9 USER 1001 diff --git a/openshift/registry.Dockerfile b/openshift/registry.Dockerfile index 6c277cb86..563dba1d3 100644 --- a/openshift/registry.Dockerfile +++ b/openshift/registry.Dockerfile @@ -1,4 +1,5 @@ FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.23-openshift-4.19 AS builder + WORKDIR /build COPY . . # TODO Modify upstream Makefile to separate the 'go build' commands