-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
50 lines (44 loc) · 1.01 KB
/
.gitlab-ci.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
image: python:3.6
stages:
- infra
- apps
- test
- deploy
before_script:
- source environment
- apt-get -y update
- apt-get -y install jq moreutils curl unzip zip
- mkdir ./external_binaries
- curl https://releases.hashicorp.com/terraform/0.12.17/terraform_0.12.17_linux_amd64.zip -o /tmp/terraform.zip
- unzip /tmp/terraform.zip -d ./external_binaries/
- rm /tmp/terraform.zip
- export PATH=$PATH:`pwd`/external_binaries/
- pip install awscli --upgrade
- pip install boto3 --upgrade
- pip install virtualenv
- export AWS_DEFAULT_REGION='us-east-1'
- make secrets
- export GOOGLE_APPLICATION_CREDENTIALS="${PROJECT_ROOT}/gcp-credentials-logs-travis.json"
infra:
stage: infra
script:
- make init-infrastructure
- make plan-infrastructure
apps:
stage: apps
script:
- make init-apps
- make install
- make plan-apps
test:
stage: test
script:
- make install
- make test
deploy:
stage: deploy
only:
- master
script:
- make init
- make deploy