Skip to content

Commit 2a75952

Browse files
[Monorepo]: Move build-container and kind-load targets to root Makefile and remove unused values from catalogd/Makefile
Partial cleanup/combine the Makefile: #1340
1 parent 4a007b0 commit 2a75952

File tree

2 files changed

+2
-31
lines changed

2 files changed

+2
-31
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ e2e-coverage:
277277
.PHONY: kind-load
278278
kind-load: $(KIND) #EXHELP Loads the currently constructed images into the KIND cluster.
279279
$(CONTAINER_RUNTIME) save $(IMG) | $(KIND) load image-archive /dev/stdin --name $(KIND_CLUSTER_NAME)
280-
IMAGE_REPO=$(CATALOG_IMAGE_REPO) KIND_CLUSTER_NAME=$(KIND_CLUSTER_NAME) $(MAKE) -C catalogd kind-load
280+
$(CONTAINER_RUNTIME) save $(CATALOGD_IMG) | $(KIND) load image-archive /dev/stdin --name $(KIND_CLUSTER_NAME)
281281

282282
.PHONY: kind-deploy
283283
kind-deploy: export MANIFEST := ./operator-controller.yaml
@@ -348,7 +348,7 @@ wait:
348348
.PHONY: docker-build
349349
docker-build: build-linux #EXHELP Build docker image for operator-controller and catalog with GOOS=linux and local GOARCH.
350350
$(CONTAINER_RUNTIME) build -t $(IMG) -f Dockerfile ./bin/linux
351-
IMAGE_REPO=$(CATALOG_IMAGE_REPO) $(MAKE) -C catalogd build-container
351+
$(CONTAINER_RUNTIME) build -f catalogd/Dockerfile -t $(CATALOG_IMAGE_REPO) ./catalogd/bin/linux
352352

353353
#SECTION Release
354354
ifeq ($(origin ENABLE_RELEASE_PIPELINE), undefined)

catalogd/Makefile

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,6 @@
33
SHELL := /usr/bin/env bash -o pipefail
44
.SHELLFLAGS := -ec
55

6-
ifeq ($(origin IMAGE_REPO), undefined)
7-
IMAGE_REPO := quay.io/operator-framework/catalogd
8-
endif
9-
export IMAGE_REPO
10-
11-
ifeq ($(origin IMAGE_TAG), undefined)
12-
IMAGE_TAG := devel
13-
endif
14-
export IMAGE_TAG
15-
16-
IMAGE := $(IMAGE_REPO):$(IMAGE_TAG)
17-
186
ifneq (, $(shell command -v docker 2>/dev/null))
197
CONTAINER_RUNTIME := docker
208
else ifneq (, $(shell command -v podman 2>/dev/null))
@@ -26,15 +14,6 @@ endif
2614
# bingo manages consistent tooling versions for things like kind, kustomize, etc.
2715
include ./../.bingo/Variables.mk
2816

29-
# Dependencies
30-
export CERT_MGR_VERSION := v1.15.3
31-
ENVTEST_SERVER_VERSION := $(shell go list -m k8s.io/client-go | cut -d" " -f2 | sed 's/^v0\.\([[:digit:]]\{1,\}\)\.[[:digit:]]\{1,\}$$/1.\1.x/')
32-
33-
# Cluster configuration
34-
ifeq ($(origin KIND_CLUSTER_NAME), undefined)
35-
KIND_CLUSTER_NAME := catalogd
36-
endif
37-
3817
##@ General
3918

4019
# The help target prints out all targets with their descriptions organized
@@ -110,14 +89,6 @@ $(LINUX_BINARIES): BUILDBIN = bin/linux
11089
$(LINUX_BINARIES):
11190
GOOS=linux $(BUILDCMD)
11291

113-
.PHONY: build-container
114-
build-container: build-linux ## Build docker image for catalogd.
115-
$(CONTAINER_RUNTIME) build -f Dockerfile -t $(IMAGE) ./bin/linux
116-
117-
.PHONY: kind-load
118-
kind-load: $(KIND) ## Load the built images onto the local cluster
119-
$(CONTAINER_RUNTIME) save $(IMAGE) | $(KIND) load image-archive /dev/stdin --name $(KIND_CLUSTER_NAME)
120-
12192
##@ Deploy
12293

12394
# The demo script requires to install asciinema with: brew install asciinema to run on mac os envs.

0 commit comments

Comments
 (0)