terraform/.travis.yml

30 lines
714 B
YAML

language: generic
# establish environment variables
env:
- TEST_DIR=examples/azure-vm-simple-linux
branches:
only:
- /^(?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
# terraform deploy script
deploy:
- provider: script
skip_cleanup: true
script: cd $TEST_DIR && chmod +x ./deploy.sh && ./deploy.sh
on:
repo: 10thmagnitude/terraform
branch: topic-101-vm-simple-linux
after_deploy:
- provider: script
script: terraform destroy