2017-04-19 02:09:15 +02:00
|
|
|
language: generic
|
2017-03-13 23:07:10 +01:00
|
|
|
|
2017-04-19 02:09:15 +02:00
|
|
|
# establish environment variables
|
2017-03-13 23:07:10 +01:00
|
|
|
env:
|
2017-04-20 00:59:56 +02:00
|
|
|
- TEST_DIR=examples/azure-vm-simple-linux
|
2017-03-13 23:07:10 +01:00
|
|
|
|
2015-01-22 21:57:01 +01:00
|
|
|
branches:
|
|
|
|
only:
|
2017-04-19 02:09:15 +02:00
|
|
|
- /^(?i:topic)-.*$/
|
|
|
|
|
|
|
|
# install terraform
|
|
|
|
before_deploy:
|
|
|
|
- curl -fSL "https://releases.hashicorp.com/terraform/0.9.3/terraform_0.9.3_linux_amd64.zip" -o terraform.zip
|
|
|
|
- sudo unzip terraform.zip -d /opt/terraform
|
|
|
|
- sudo ln -s /opt/terraform/terraform /usr/bin/terraform
|
|
|
|
- rm -f terraform.zip
|
|
|
|
|
2017-04-19 17:51:07 +02:00
|
|
|
# terraform deploy script
|
2017-04-19 02:09:15 +02:00
|
|
|
deploy:
|
|
|
|
- provider: script
|
|
|
|
skip_cleanup: true
|
2017-04-19 17:59:21 +02:00
|
|
|
script: cd $TEST_DIR && chmod +x ./deploy.sh && ./deploy.sh
|
2017-04-19 02:09:15 +02:00
|
|
|
on:
|
|
|
|
repo: 10thmagnitude/terraform
|
2017-04-19 17:51:07 +02:00
|
|
|
branch: topic-101-vm-simple-linux
|