-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
74 lines (67 loc) · 1.16 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
image: tiangolo/docker-with-compose
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- pip install docker-auto-labels
stages:
- test
- build
- deploy
tests:
stage: test
script:
- sh ./scripts/test.sh
tags:
- build
- test
build-stag:
stage: build
script:
- TAG=stag FRONTEND_ENV=staging sh ./scripts/build-push.sh
only:
- master
tags:
- build
- test
build-prod:
stage: build
script:
- TAG=prod FRONTEND_ENV=production sh ./scripts/build-push.sh
only:
- production
tags:
- build
- test
deploy-stag:
stage: deploy
script:
- >
DOMAIN=stag.karl.qanta.org
TRAEFIK_TAG=stag.karl
STACK_NAME=stag-karl
TAG=stag
sh ./scripts/deploy.sh
environment:
name: staging
url: https://stag.karl.qanta.org
only:
- master
tags:
- swarm
- stag
deploy-prod:
stage: deploy
script:
- >
DOMAIN=karl.qanta.org
TRAEFIK_TAG=karl
STACK_NAME=karl
TAG=prod
sh ./scripts/deploy.sh
environment:
name: production
url: https://karl.qanta.org
only:
- production
tags:
- swarm
- prod