From 628d5041ae2ebe98c3a095e37c5378201d0ed444 Mon Sep 17 00:00:00 2001 From: Andrey Lebedev Date: Wed, 3 Jul 2024 11:14:15 +0200 Subject: [PATCH] NO-JIRA: Add hack Makefile rule to build CI version of router image --- hack/Makefile.debug | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hack/Makefile.debug b/hack/Makefile.debug index cc48b3fcd..f4a5cc42e 100644 --- a/hack/Makefile.debug +++ b/hack/Makefile.debug @@ -3,7 +3,8 @@ export GOOS=linux REGISTRY ?= quay.io -IMAGE ?= openshift/openshift-router +IMAGE ?= $(USER)/openshift-router +IMAGE_BASE ?= $(USER)/openshift-router-base TAG ?= latest IMAGEBUILDER ?= podman @@ -11,6 +12,12 @@ new-openshift-router-image: GO111MODULE=on CGO_ENABLED=0 GOFLAGS=-mod=vendor go build -o openshift-router -gcflags=all="-N -l" ./cmd/openshift-router $(IMAGEBUILDER) build -t $(IMAGE):$(TAG) -f hack/Dockerfile.debug . +new-ci-router-image: + $(IMAGEBUILDER) build -t $(IMAGE_BASE):$(TAG) -f images/router/base/Dockerfile.rhel . + cp -f images/router/haproxy/Dockerfile.rhel8 images/router/haproxy/Dockerfile.rhel8.debug + sed -i "s|FROM .*|FROM $(IMAGE_BASE):$(TAG)|" images/router/haproxy/Dockerfile.rhel8.debug + $(IMAGEBUILDER) build -t $(IMAGE):$(TAG) -f images/router/haproxy/Dockerfile.rhel8.debug . + push: $(IMAGEBUILDER) tag $(IMAGE):$(TAG) $(REGISTRY)/$(IMAGE):$(TAG) $(IMAGEBUILDER) push $(REGISTRY)/$(IMAGE):$(TAG)