forked from nielsabels/packer-xenial64
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (28 loc) · 949 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# We ASSUME end-user uses
# # VMware on a Windows platform
# # Virtualbox on a Linux/OSX platform
ifeq ($(OS),Windows_NT)
vm-provider := vmware
else
vm-provider := vbox
endif
default: all
all: kitchen
nginx64-vbox.box: nginx64.json scripts/provision.sh http/preseed.cfg
packer validate nginx64.json
packer build -force -only=nginx64-vbox nginx64.json
vagrant box add ./nginx64-vbox.box --name nginx64
nginx64-vmware.box: nginx64.json scripts/provision.sh http/preseed.cfg
packer validate nginx64.json
packer build -force -only=nginx64-vmware nginx64.json
vagrant box add ./nginx64-vbox.box --name nginx64
kitchen-vbox: nginx64-vbox.box
bundle exec kitchen test vbox
kitchen-vmware: nginx64-vmware.box
bundle exec kitchen test vmware
kitchen: kitchen-$(vm-provider)
.PHONY: clean
clean:
-vagrant box remove -f nginx64 --provider virtualbox
-vagrant box remove -f nginx64 --provider vmware_desktop
-rm -fr output-*/ *.box