-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
61 lines (50 loc) · 1.47 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
language: python
python:
- "3.6"
sudo: required
services:
- docker
env:
- TOX_ENV=py36
- TOX_ENV=flake8
matrix:
fast_finish: true
install:
- pip install tox
script: tox -e $TOX_ENV
after_success:
- docker --version # document the version travis is using
jobs:
include:
- stage: build
install: pip install awscli # install aws cli w/o sudo
env:
- ENVIRONMENT=dev # put aws in the path
- PATH=$PATH:$HOME/.local/bin # put aws in the path
- AWS_ACCESS_KEY_ID=$CI_AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY=$CI_AWS_SECRET_ACCESS_KEY
script: make build
- stage: infrastructure
install: pip install awscli # install aws cli w/o sudo
env:
- ENVIRONMENT=dev # put aws in the path
- PATH=$PATH:$HOME/.local/bin # put aws in the path
- AWS_ACCESS_KEY_ID=$CI_AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY=$CI_AWS_SECRET_ACCESS_KEY
script: make infrastructure
- stage: deploy
install: pip install awscli # install aws cli w/o sudo
env:
- ENVIRONMENT=dev # put aws in the path
- PATH=$PATH:$HOME/.local/bin # put aws in the path
- AWS_ACCESS_KEY_ID=$CI_AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY=$CI_AWS_SECRET_ACCESS_KEY
script: make deploy
stages:
- test
- name: build
if: branch = master AND type = push
- name: infrastructure
if: branch = master AND type = push
- name: deploy
if: branch = master AND type = push