Skip to content

add openshift specific build target to pass commit info downstream #1

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

Merged
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
5 changes: 5 additions & 0 deletions openshift/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 1 addition & 3 deletions openshift/catalogd.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.23-openshift-4.19 AS builder

ENV GIT_COMMIT=${SOURCE_GIT_COMMIT}

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
Expand Down
4 changes: 1 addition & 3 deletions openshift/operator-controller.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.23-openshift-4.19 AS builder

ENV GIT_COMMIT=${SOURCE_GIT_COMMIT}

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
Expand Down
3 changes: 0 additions & 3 deletions openshift/registry.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.23-openshift-4.19 AS builder

ARG SOURCE_GIT_COMMIT
ENV GIT_COMMIT=${SOURCE_GIT_COMMIT}

WORKDIR /build
COPY . .
# TODO Modify upstream Makefile to separate the 'go build' commands
Expand Down