-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
94 lines (83 loc) · 1.52 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
image: $BASE_CI_IMAGE
services:
- docker:19.03.12-dind
stages:
- build
- deploy
- loadtest
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=d.sayapp.company
STACK_NAME=say-dev-backend
sh ./scripts/deploy.sh
only:
- develop
tags:
- deploy
deploy-stag:
stage: deploy
retry: 2
script:
- >
ENVIRONMENT=stag
DOMAIN=s.sayapp.company
STACK_NAME=say-stag-backend
sh ./scripts/deploy.sh
only:
- master
tags:
- deploy
deploy-prod:
stage: deploy
retry: 2
script:
- >
ENVIRONMENT=prod
DOMAIN=sayapp.company
STACK_NAME=say-backend
sh ./scripts/deploy.sh
only:
- release
tags:
- deploy-prod
smock-test:
image:
name: loadimpact/k6:latest
entrypoint: [""]
stage: loadtest
before_script:
- '' # Only to override default before_script
script:
- BASE_URL=https://s.sayapp.company k6 run ./tests/loadtest/smock-test.js
only:
- release