2017-04-20 19:34:32 +02:00
|
|
|
sudo: required
|
|
|
|
|
2017-04-20 19:52:12 +02:00
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
|
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:10:41 +02:00
|
|
|
- master
|
2017-04-19 02:09:15 +02:00
|
|
|
- /^(?i:topic)-.*$/
|
|
|
|
|
|
|
|
# install terraform
|
2017-04-24 20:27:00 +02:00
|
|
|
before_deploy:
|
|
|
|
- export KEY=$(cat /dev/urandom | tr -cd 'a-z' | head -c 12)
|
|
|
|
- export PASSWORD=$KEY$(cat /dev/urandom | tr -cd 'A-Z' | head -c 2)$(cat /dev/urandom | tr -cd '0-9' | head -c 2)
|
2017-04-24 18:45:24 +02:00
|
|
|
|
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-24 20:43:38 +02:00
|
|
|
script: cd $TRAVIS_BUILD_DIR/$TEST_DIR && ./deploy.sh
|
2017-04-24 19:17:22 +02:00
|
|
|
on:
|
|
|
|
repo: 10thmagnitude/terraform
|
|
|
|
branch: topic-101-vm-simple-linux
|
2017-04-20 02:29:36 +02:00
|
|
|
|
2017-04-24 18:45:24 +02:00
|
|
|
# destroy resources with Azure CLI
|
2017-04-24 21:35:48 +02:00
|
|
|
after_deploy: cd $TRAVIS_BUILD_DIR/$TEST_DIR && ./after_deploy.sh
|