File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ VERSION ?= git-$(shell git rev-parse --short HEAD)
66IMAGE = $(DEIS_REGISTRY )$(IMAGE_PREFIX ) /$(COMPONENT ) :$(VERSION )
77SHELL_SCRIPTS = $(wildcard rootfs/bin/* ) $(shell find "rootfs" -name '* .sh') $(wildcard _scripts/* .sh)
88
9+ # Get the component informtation to a tmp location and get replica count
10+ $(shell kubectl get rc deis-$(COMPONENT) --namespace deis -o yaml > /tmp/deis-$(COMPONENT))
11+ DESIRED_REPLICAS =$(shell kubectl get -o template rc/deis-$(COMPONENT ) --template={{.status.replicas}})
12+
913info :
1014 @echo " Build tag: ${VERSION} "
1115 @echo " Registry: ${DEIS_REGISTRY} "
@@ -53,6 +57,11 @@ update-manifests:
5357 sed ' s#\(image:\) .*#\1 $(IMAGE)#' manifests/deis-workflow-rc.yml \
5458 > manifests/deis-workflow-rc.tmp.yml
5559
60+ deploy : docker-build docker-push
61+ sed ' s#\(image:\) .*#\1 $(IMAGE)#' /tmp/deis-$(COMPONENT ) | kubectl apply --validate=true -f -
62+ kubectl scale rc deis-workflow --replicas 0 --namespace deis
63+ kubectl scale rc deis-workflow --replicas $(DESIRED_REPLICAS ) --namespace deis
64+
5665clean : check-docker
5766 docker rmi $(IMAGE )
5867
You can’t perform that action at this time.
0 commit comments