-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec.yml
31 lines (29 loc) · 1.04 KB
/
buildspec.yml
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
---
version: 0.2
phases:
pre_build:
commands:
- echo "Installing HashiCorp Packer..."
- curl -qL -o packer.zip https://releases.hashicorp.com/packer/1.4.0/packer_1.4.0_linux_amd64.zip &&
unzip packer.zip -d /tmp/ &&
install -m 755 -o root -g root /tmp/packer /usr/local/bin/ &&
command -v packer
- echo "Installing Ansible"
- test -e /usr/bin/apt-add-repository ||
(apt-get update &&
apt-get install --yes software-properties-common)
- apt-add-repository --yes ppa:ansible/ansible &&
apt-get update &&
apt-get install --yes ansible
- echo "Validating packer-template.json"
- packer validate -var-file=packer/ubuntu-source.json packer/boiler.json
build:
commands:
- echo "Building HashiCorp Packer template, packer-template.json"
- packer build -color=false -var-file=packer/ubuntu-source.json packer/boiler.json
post_build:
commands:
- echo "HashiCorp Packer build completed on `date`"
artifacts:
files:
- packer-manifest.json