Skip to content

Commit

Permalink
run make target
Browse files Browse the repository at this point in the history
Added make target that combines building, resetting the VM, and
provisioning it with bootkube. Installs archives to speed up go builds.
  • Loading branch information
Dan Gillespie committed Sep 23, 2016
1 parent 0bb2bfc commit 9e2e89e
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9e2e89e

Please sign in to comment.