-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
80 lines (71 loc) · 1.26 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
image: tiangolo/docker-with-compose
services:
- docker:19.03.12-dind
stages:
- build
- deploy
variables:
CONTAINER_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
BASE_IMAGE: $CI_REGISTRY_IMAGE:base
before_script:
- docker login -u $USER -p $TOKEN $CI_REGISTRY
build-dev:
stage: build
retry: 2
script:
- ENVIRONMENT=dev sh ./scripts/build-push.sh
only:
- develop
build-stag:
stage: build
retry: 2
script:
- ENVIRONMENT=stag sh ./scripts/build-push.sh
only:
- master
build-prod:
stage: build
retry: 2
script:
- ENVIRONMENT=prod sh ./scripts/build-push.sh
only:
- release
deploy-dev:
stage: deploy
retry: 2
script:
- >
ENVIRONMENT=dev
DOMAIN=panel.d.sayapp.company
STACK_NAME=say-dev-panel
sh ./scripts/deploy.sh
only:
- develop
tags:
- deploy
deploy-stag:
stage: deploy
retry: 2
script:
- >
ENVIRONMENT=stag
DOMAIN=panel.s.sayapp.company
STACK_NAME=say-stag-panel
sh ./scripts/deploy.sh
only:
- master
tags:
- deploy
deploy-prod:
stage: deploy
retry: 2
script:
- >
ENVIRONMENT=prod
DOMAIN=panel.sayapp.company
STACK_NAME=say-panel
sh ./scripts/deploy.sh
only:
- release
tags:
- deploy-prod