File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,15 +8,15 @@ include versioning.mk
88
99SHELL_SCRIPTS = $(wildcard rootfs/bin/* ) $(shell find "rootfs" -name '* .sh') $(wildcard _scripts/* .sh)
1010
11- # Get the component informtation to a tmp location and get replica count
12- KUBE := $(shell which kubectl)
13- ifdef KUBE
14- $(shell kubectl get deployment deis-$(COMPONENT) --namespace deis -o yaml > /tmp/deis-$(COMPONENT))
15- endif
16-
1711# Test processes used in quick unit testing
1812TEST_PROCS ?= 4
1913
14+ check-kubectl :
15+ @if [ -z $$ (which kubectl) ]; then \
16+ echo " kubectl binary could not be located" ; \
17+ exit 2; \
18+ fi
19+
2020check-docker :
2121 @if [ -z $$ (which docker) ]; then \
2222 echo " Missing \` docker\` client which is required for development" ; \
@@ -29,8 +29,8 @@ docker-build: check-docker
2929 docker build --rm -t ${IMAGE} rootfs
3030 docker tag ${IMAGE} ${MUTABLE_IMAGE}
3131
32- deploy : docker-build docker-push
33- sed ' s#\(image:\) .*#\1 $(IMAGE)# ' /tmp/ deis-$(COMPONENT ) | kubectl apply --validate=true -f -
32+ deploy : check-kubectl docker-build docker-push
33+ kubectl patch deployment deis-$(COMPONENT ) --type= ' json ' -p= ' [{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"$(IMAGE)"}] '
3434
3535clean : check-docker
3636 docker rmi $(IMAGE )
You can’t perform that action at this time.
0 commit comments