-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
36 lines (33 loc) · 1.15 KB
/
.travis.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
32
33
34
35
36
---
# yamllint disable rule:line-length
dist: trusty
sudo: required
services:
- docker
branches:
only:
- master
env:
- VERSION="0.2.$TRAVIS_BUILD_NUMBER"
addons:
apt:
packages:
- git
- curl
before_script:
- export TERRAFORM_VERSION=$(curl -s https://checkpoint-api.hashicorp.com/v1/check/terraform | jq -r -M '.current_version')
- curl --silent --output terraform.zip "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip"
- unzip terraform.zip ; rm -f terraform.zip; chmod +x terraform
- mkdir -p ${HOME}/bin ; export PATH=${PATH}:${HOME}/bin; mv terraform ${HOME}/bin/
- terraform -v
script:
- terraform init -get-plugins -backend=false -input=false
- terraform init -get -backend=false -input=false
- terraform fmt
- bash validate.sh
after_success:
- git config --global user.email "[email protected]"
- git config --global user.name "Travis CI"
- export GIT_TAG=$VERSION
- git tag $GIT_TAG -a -m "Generated tag from TravisCI build $VERSION"
- git push --quiet https://[email protected]/slalom-consulting-ltd/terraform-github-team $GIT_TAG > /dev/null 2>&1