mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-02 12:17:39 -06:00
afb164b79a
* added .travis.yml and deploy.sh * added deploy script, updated travis.yml to build topic- branches * generate random string for hostname * plan now produces output plan, apply now consumes outputted plan * cleanup; sane defaults * explicit build dirs
32 lines
730 B
YAML
32 lines
730 B
YAML
sudo: required
|
|
|
|
services:
|
|
- docker
|
|
|
|
language: generic
|
|
|
|
# establish environment variables
|
|
env:
|
|
- TEST_DIR=examples/azure-vm-simple-linux
|
|
|
|
branches:
|
|
only:
|
|
- master
|
|
- /^(?i:topic)-.*$/
|
|
|
|
# install terraform
|
|
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)
|
|
|
|
# terraform deploy script
|
|
deploy:
|
|
- provider: script
|
|
skip_cleanup: true
|
|
script: cd $TRAVIS_BUILD_DIR/$TEST_DIR && ./deploy.sh
|
|
on:
|
|
repo: 10thmagnitude/terraform
|
|
branch: topic-101-vm-simple-linux
|
|
|
|
# destroy resources with Azure CLI
|
|
after_deploy: cd $TRAVIS_BUILD_DIR/$TEST_DIR && ./after_deploy.sh |