forked from cloudbooster/terraform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
40 lines (32 loc) · 1.05 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
37
38
39
40
sudo: required
services:
- docker
language: generic
# on branches: ignore multiple commits that will queue build jobs, just run latest commit
git:
depth: 1
# establish environment variables
env:
- TEST_DIR=examples/azure-vm-simple-linux-managed-disk
- TEST_DIR=examples/azure-vm-from-user-image
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)
- export EXISTING_IMAGE_URI=https://permanentstor.blob.core.windows.net/permanent-vhds/permanent-osdisk1.vhd
- export EXISTING_STORAGE_ACCOUNT_NAME=permanentstor
- export EXISTING_RESOURCE_GROUP=permanent
# terraform deploy script
deploy:
- provider: script
skip_cleanup: true
script: cd $TRAVIS_BUILD_DIR/$TEST_DIR && ./deploy.ci.sh
on:
repo: 10thmagnitude/terraform
branch: master
# cleanup
after_deploy: cd $TRAVIS_BUILD_DIR/$TEST_DIR && ./after_deploy.ci.sh