-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
69 lines (63 loc) · 1.17 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
stages:
- test
- build
- deploy
test:
image: node:10.15
stage: test
cache:
key: $CI_COMMIT_REF_NAME
paths:
- node_modules/
script:
- npm i --silent
- npm run lint
- npm run test
only:
- merge_requests
tags:
- docker
include:
- project: 'service/devops'
ref: master
file: 'build/backend/.gitlab-ci.yml'
.deploy:
stage: deploy
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- docker-compose pull
- docker-compose -p 656-echo-explorer-backend up -d
develop-deploy:
extends: .deploy
variables:
NODE_APP_INSTANCE: develop
environment:
name: develop
url: https://656-echo-explorer.pixelplex-test.by
only:
- develop
tags:
- pp-new-develop
stage-deploy:
extends: .deploy
variables:
NODE_APP_INSTANCE: master
environment:
name: master
url: http://656-echo-explorer.pixelplexlabs.com
only:
- master
tags:
- pp-stage
production-deploy:
extends: .deploy
variables:
NODE_APP_INSTANCE: prod
environment:
name: prod
url: https://explorer.echo-dev.io
only:
- tags
tags:
- echo-explorer-1