forked from mantl/mantl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
37 lines (35 loc) · 1.62 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
language: python
env:
global:
- TF_VAR_build_number=${TRAVIS_JOB_NUMBER/./-}
- DOCKER_ARGS='-i -a stdout -a stderr -e TF_VAR_build_number -e CI_HEAD_COMMIT -e TRAVIS_COMMIT_RANGE -e TRAVIS_REPO_SLUG -e TRAVIS_BRANCH -e TRAVIS_PULL_REQUEST -e TERRAFORM_FILE'
- DOCKER_IMAGE=sehqlr/mantl:testing
matrix:
- TERRAFORM_FILE=testing/aws.tf DOCKER_SECRETS='-e AWS_SECRET_ACCESS_KEY -e AWS_ACCESS_KEY_ID'
- TERRAFORM_FILE=testing/do.tf DOCKER_SECRETS='-e DIGITALOCEAN_TOKEN'
- TERRAFORM_FILE=testing/gce.tf DOCKER_SECRETS='-e GOOGLE_CREDENTIALS'
install: pip install -r requirements.txt
before_script:
- export CI_HEAD_COMMIT=$(git rev-list -n 1 --no-merges --branches="$(git rev-parse --abbrev-ref HEAD)" master...HEAD)
- echo $CI_HEAD_COMMIT
- docker pull $DOCKER_IMAGE
- docker run $DOCKER_ARGS -v $(pwd)/testing:/local -v $(pwd):/mantl $DOCKER_SECRETS $DOCKER_IMAGE "python2 docker.py ci-setup"
script:
- python2 testing/test-health-checks.py
- docker run $DOCKER_ARGS -v $(pwd)/testing:/local -v $(pwd):/mantl $DOCKER_SECRETS $DOCKER_IMAGE "python docker.py ci-build"
after_script:
- docker run $DOCKER_ARGS -v $(pwd)/testing:/local -v $(pwd):/mantl $DOCKER_SECRETS
$DOCKER_IMAGE "python docker.py ci-destroy"
sudo: required
services:
- docker
addons:
apt:
packages:
- unzip
notifications:
slack:
secure: eX3VgtKQ48rzKGdXpIZZVYINffI2wbqhqoJFUxHO1Zku6tXzbt0R+r3NVHo37wBID63bkXjYqjZuv+JRUtvf/XO51+QkTqCCZ6iC3lr6IEqRpzxXsmNYf+QPhuN2kvVTSyycHFXdwQLL7sCniFSmEcLdu6xMpobI4PUwi2OvHj4=
before_install:
- openssl aes-256-cbc -K $encrypted_6a9d32f3e0bd_key -iv $encrypted_6a9d32f3e0bd_iv
-in ci.enc -out testing/ci -d