-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
63 lines (54 loc) · 996 Bytes
/
.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
variables:
COMMIT_TAG: "$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-$CI_PIPELINE_ID"
COMMIT_HASH: "$CI_COMMIT_SHA"
stages:
- build
- deploy
- stop
build:
stage: build
only:
- main
- master
script:
- build.sh $SCW_SECRET_KEY $CI_PROJECT_PATH
deploy_staging:
stage: deploy
only:
- main
- master
environment:
name: staging
url: https://staging.URL_PROD
on_stop: stop_staging
script:
- deploy.sh staging $SCW_SECRET_KEY $CI_PROJECT_PATH
when: manual
stop_staging:
stage: stop
environment:
name: staging
action: stop
script:
- stop.sh staging $CI_PROJECT_PATH
when: manual
deploy_prod:
stage: deploy
only:
- main
- master
environment:
name: prod
url: https://URL_PROD
on_stop: stop_prod
script:
- deploy.sh prod $SCW_SECRET_KEY $CI_PROJECT_PATH
when: manual
stop_prod:
stage: stop
environment:
name: prod
action: stop
script:
- stop.sh prod $CI_PROJECT_PATH
when: manual