From 9e2e89e985a4a28178ac35abdab3c2ad7ec15b89 Mon Sep 17 00:00:00 2001 From: Dan Gillespie Date: Fri, 23 Sep 2016 12:48:45 -0700 Subject: [PATCH] run make target Added make target that combines building, resetting the VM, and provisioning it with bootkube. Installs archives to speed up go builds. --- Makefile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 332159bf1..deb05ddf4 100644 --- a/Makefile +++ b/Makefile @@ -25,12 +25,27 @@ install: _output/bin/$(LOCAL_OS)/bootkube _output/bin/%: $(GOFILES) mkdir -p $(dir $@) - GOOS=$(word 1, $(subst /, ,$*)) go build -ldflags "$(LDFLAGS)" -o $@ github.com/kubernetes-incubator/bootkube/cmd/$(notdir $@) + GOOS=$(word 1, $(subst /, ,$*)) go build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o $@ github.com/kubernetes-incubator/bootkube/cmd/$(notdir $@) _output/release/bootkube.tar.gz: _output/bin/linux/bootkube _output/bin/darwin/bootkube _output/bin/linux/checkpoint mkdir -p $(dir $@) tar czf $@ -C _output bin/linux/bootkube bin/darwin/bootkube bin/linux/checkpoint +run-%: GOFLAGS = -i +run-%: clean-vm-% _output/bin/linux/bootkube _output/bin/$(LOCAL_OS)/bootkube + @until (cd hack/$*-node && vagrant up 2>/dev/null);\ + do \ + echo "Vagrant not ready."; \ + sleep 5; \ + done; + @cd hack/$*-node && ./bootkube-up + @echo "Bootkube ready" + +clean-vm-single: +clean-vm-%: + @echo "Cleaning VM..." + @(cd hack/single-node && vagrant destroy -f && vagrant up) & + #TODO(aaron): Prompt because this is destructive conformance-%: clean all @cd hack/$*-node && vagrant destroy -f