Skip to content

Commit

Permalink
Vagrant fixes (#125)
Browse files Browse the repository at this point in the history
* Fix destroy before bootkube clone
* Fix multiple calls of vagrant-destroy.sh
  • Loading branch information
bzub committed Aug 13, 2017
1 parent 82818d8 commit ef8cf33
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ vagrant: ## Run vagrant against a previously up'd cluster. Example: make vagrant

vagrant-destroy: ## Destroy a previously created local VM cluster
@hack/vagrant-destroy.sh
@HACK_MULTI_NODE="true" hack/vagrant-destroy.sh

vagrant-clean: vagrant-destroy ## Destroy a previously created local VM cluster and remove all downloaded/generated assets
@rm -rf hack/_output
Expand Down
5 changes: 5 additions & 0 deletions hack/vagrant-destroy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ export HACK_DIR
# shellcheck source=vagrant-common.sh
. "${HACK_DIR}/vagrant-common.sh"

if [ ! -d "${BK_CLONE_DIR}" ]; then
echo "INFO: Bootkube repo not found. Nothing to destroy."
exit 0
fi

for i in "${BK_CLONE_DIR}/hack/single-node" "${BK_CLONE_DIR}/hack/multi-node"; do
echo "INFO: Running vagrant destroy -f in ${i}"
cd "${i}"
Expand Down

0 comments on commit ef8cf33

Please sign in to comment.