Skip to content

Commit 8910561

Browse files
committed
make independent binary image build
1 parent 640e9fc commit 8910561

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

Makefile

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -150,21 +150,24 @@ deploy: generate_yaml_test
150150
# images section
151151
############################################################
152152
# Build the docker image
153-
build-images: test
154-
docker build . -f cmd/manager/Dockerfile -t $(REGISTRY)/$(CONTROLLER_IMG):$(VERSION)
153+
clusterctl-image:
155154
docker build . -f cmd/clusterctl/Dockerfile -t $(REGISTRY)/$(CLUSTERCTL_IMG):$(VERSION)
155+
controller-image:
156+
docker build . -f cmd/manager/Dockerfile -t $(REGISTRY)/$(CONTROLLER_IMG):$(VERSION)
156157

157-
# Push the docker image
158-
push-images:
159-
@echo "push images to $(REGISTRY)"
160-
docker push $(REGISTRY)/$(CONTROLLER_IMG):$(VERSION)
158+
push-clusterctl-image:
161159
docker push $(REGISTRY)/$(CLUSTERCTL_IMG):$(VERSION)
162-
163-
build-push-images:
164-
docker build . -f cmd/manager/Dockerfile -t $(REGISTRY)/$(CONTROLLER_IMG):$(VERSION)
160+
push-controller-image:
165161
docker push $(REGISTRY)/$(CONTROLLER_IMG):$(VERSION)
166-
docker build . -f cmd/clusterctl/Dockerfile -t $(REGISTRY)/$(CLUSTERCTL_IMG):$(VERSION)
167-
docker push $(REGISTRY)/$(CLUSTERCTL_IMG):$(VERSION)
162+
163+
images: test clusterctl-image controller-image
164+
push-images: push-clusterctl-image push-controller-image
165+
166+
build-push-images: build-images push-images
167+
168+
# quickly get target image
169+
new-controller: controller-image push-controller-image
170+
new-clusterctl: clusterctl-image push-clusterctl-image
168171

169172
############################################################
170173
# clean section

0 commit comments

Comments
 (0)