-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
62 lines (56 loc) · 1.48 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
stages:
- build
- deploy
build:
stage: build
variables:
NODE_APP_INSTANCE: $CI_COMMIT_REF_NAME
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- docker build --cache-from $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA -t $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
only:
- master
- develop
tags:
- echo-linux
build.develop:
stage: deploy
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
variables:
CI_FULL_REGISTRY: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
NODE_ENV: production
NODE_APP_INSTANCE: develop
PORT: 36491
script:
- docker-compose pull
- docker-compose -p bridge-develop up -d
only:
- develop
tags:
- bridge-dev
environment:
name: develop
url: https://649-bridge-landing.pixelplex-test.by
build.master:
stage: deploy
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
variables:
CI_FULL_REGISTRY: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
NODE_ENV: production
NODE_APP_INSTANCE: master
PORT: 26491
script:
- docker-compose pull
- docker-compose -p bridge-master up -d
only:
- master
tags:
- bridge-dev
environment:
name: stage
url: https://649-bridge-landing.pixelplexlabs.com