Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

Commit 9e2e89e

Browse files
author
Dan Gillespie
committed
run make target
Added make target that combines building, resetting the VM, and provisioning it with bootkube. Installs archives to speed up go builds.
1 parent 0bb2bfc commit 9e2e89e

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

Makefile

+16-1
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,27 @@ install: _output/bin/$(LOCAL_OS)/bootkube
2525

2626
_output/bin/%: $(GOFILES)
2727
mkdir -p $(dir $@)
28-
GOOS=$(word 1, $(subst /, ,$*)) go build -ldflags "$(LDFLAGS)" -o $@ github.com/kubernetes-incubator/bootkube/cmd/$(notdir $@)
28+
GOOS=$(word 1, $(subst /, ,$*)) go build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o $@ github.com/kubernetes-incubator/bootkube/cmd/$(notdir $@)
2929

3030
_output/release/bootkube.tar.gz: _output/bin/linux/bootkube _output/bin/darwin/bootkube _output/bin/linux/checkpoint
3131
mkdir -p $(dir $@)
3232
tar czf $@ -C _output bin/linux/bootkube bin/darwin/bootkube bin/linux/checkpoint
3333

34+
run-%: GOFLAGS = -i
35+
run-%: clean-vm-% _output/bin/linux/bootkube _output/bin/$(LOCAL_OS)/bootkube
36+
@until (cd hack/$*-node && vagrant up 2>/dev/null);\
37+
do \
38+
echo "Vagrant not ready."; \
39+
sleep 5; \
40+
done;
41+
@cd hack/$*-node && ./bootkube-up
42+
@echo "Bootkube ready"
43+
44+
clean-vm-single:
45+
clean-vm-%:
46+
@echo "Cleaning VM..."
47+
@(cd hack/single-node && vagrant destroy -f && vagrant up) &
48+
3449
#TODO(aaron): Prompt because this is destructive
3550
conformance-%: clean all
3651
@cd hack/$*-node && vagrant destroy -f

0 commit comments

Comments
 (0)