-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
63 lines (63 loc) · 1.69 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
language: python
python:
- '3.7'
dist: bionic
env:
global:
- TF_IN_AUTOMATION=1
- SERVICE_NAME=python-ecs-base
- VERSION=0.12.21
- DEPLOYMENT_ACCESS_KEY_ID=
- DEPLOYMENT_SECRET_ACCESS_KEY=
- AWS_DEFAULT_REGION=
- KMS_KEY_ID=
- ROLE_ARN=
- STATE_S3_BUCKET=
- STATE_DYNAMODB_TABLE=
- KEY=
- SERVICE_KEY=
- SPLUNK_URL=
- OPERATIONS_ROLE_ARN=
before_install:
- wget https://releases.hashicorp.com/terraform/${VERSION}/terraform_${VERSION}_linux_amd64.zip
- unzip terraform_${VERSION}_linux_amd64.zip -d $HOME/bin
- chmod +x $HOME/bin/terraform
- export AWS_ACCESS_KEY_ID=$DEPLOYMENT_ACCESS_KEY_ID
- export AWS_SECRET_ACCESS_KEY=$DEPLOYMENT_SECRET_ACCESS_KEY
- export AUTHOR_NAME="$(git log -1 $TRAVIS_COMMIT --pretty="%aN")"
cache:
directories:
- "$HOME/.cache/pip"
- "$HOME/.pyenv"
jobs:
include:
- stage: test
install: pip install -r requirements.txt
script: python -m unittest discover test
after_success:
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash deployment/script/travis_push_container.sh; fi
- stage: deploy to development
if: type = push AND env(DEPLOY_PRODUCTION) IS present
install: skip
script: skip
deploy:
skip_cleanup: true
provider: script
script: bash deployment/script/travis_deploy.sh development
on:
all_branches: true
- stage: deploy to production
if: type = push AND branch = master AND env(DEPLOY_PRODUCTION) IS present
env:
script: skip
deploy:
skip_cleanup: true
provider: script
script: bash deployment/script/travis_deploy.sh production
on:
branch: master
addons:
snaps:
- name: aws-cli
confinement: classic
channel: latest/stable