-
Notifications
You must be signed in to change notification settings - Fork 36
/
.gitlab-ci.yml
98 lines (87 loc) · 1.91 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
variables:
DOCKER_REPOSITORY: "mozmeao/snippets"
stages:
- build
- test
- deploy
build-image-django:
stage: build
tags:
- mozmeao
script:
- CI_COMMIT_SHORT_SHA=latest make pull app=web
- CI_COMMIT_SHORT_SHA=latest make pull app=builder
- make build app=web
- make push app=web
# With latest tag for caching
- CI_COMMIT_SHORT_SHA=latest make build app=web
- CI_COMMIT_SHORT_SHA=latest make push app=web
- CI_COMMIT_SHORT_SHA=latest make build app=builder
- CI_COMMIT_SHORT_SHA=latest make push app=builder
build-image-redirector:
stage: build
tags:
- mozmeao
script:
- CI_COMMIT_SHORT_SHA=latest make pull app=redirector
- make build app=redirector
- make push app=redirector
# With latest tag for caching
- CI_COMMIT_SHORT_SHA=latest make build app=redirector
- CI_COMMIT_SHORT_SHA=latest make push app=redirector
check-migrations:
stage: test
tags:
- mozmeao
script:
- make check-migrations
run-flake8:
stage: test
tags:
- mozmeao
rules:
- allow_failure: true
script:
- make lint
run-unit-tests-django:
stage: test
tags:
- mozmeao
script:
- make test-web
run-unit-tests-redirector:
tags:
- mozmeao
script:
- make test-redirector
.deploy:
stage: deploy
tags:
- mozmeao
- aws
script:
- bin/update-config.sh
stage:
extends: .deploy
only:
- stage
variables:
NAMESPACE: snippets-stage
CLUSTERS: oregon-eks
DOCKER_IMAGE_TAG: "${DOCKER_REPOSITORY}:${CI_COMMIT_SHORT_SHA}"
admin:
extends: .deploy
only:
- admin
variables:
NAMESPACE: snippets-admin
CLUSTERS: oregon-eks
DOCKER_IMAGE_TAG: "${DOCKER_REPOSITORY}:${CI_COMMIT_SHORT_SHA}"
prod:
extends: .deploy
only:
- prod
variables:
NAMESPACE: snippets-prod
CLUSTERS: frankfurt-eks oregon-eks
DOCKER_IMAGE_TAG: "${DOCKER_REPOSITORY}:redirector-${CI_COMMIT_SHORT_SHA}"