Skip to content

Commit

Permalink
NO-JIRA: Add hack Makefile target to build CI version of router image
Browse files Browse the repository at this point in the history
  • Loading branch information
alebedev87 committed Jul 3, 2024
1 parent 4d9b8c4 commit 0df56d3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion hack/Makefile.debug
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@
export GOOS=linux

REGISTRY ?= quay.io
IMAGE ?= openshift/openshift-router
IMAGE ?= $(USER)/openshift-router
IMAGE_BASE ?= $(USER)/openshift-router-base
TAG ?= latest
IMAGEBUILDER ?= podman

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)
Expand Down

0 comments on commit 0df56d3

Please sign in to comment.