-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
54 lines (49 loc) · 1.06 KB
/
.gitlab-ci.yml
File metadata and controls
54 lines (49 loc) · 1.06 KB
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
stages:
- code_style
- build
- deploy
variables:
DIMIGOIN_REGISTRY: docker-registry.dimigo.in
IMAGE_NAME: echo-back
PRO_IMAGE_TAG: $DIMIGOIN_REGISTRY/$IMAGE_NAME:production
DEV_IMAGE_TAG: $DIMIGOIN_REGISTRY/$IMAGE_NAME:dev
prettier:
image: node
stage: code_style
script:
- npm i prettier -g
- prettier --check "**/*.js"
docker-build:
image: docker:latest
stage: build
script:
- docker build -t $PRO_IMAGE_TAG -t $DEV_IMAGE_TAG .
tags:
- main
dev-deploy:
image: docker:latest
stage: deploy
only:
- develop
script:
- docker login -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD $DIMIGOIN_REGISTRY
- docker push $DEV_IMAGE_TAG
environment:
name: test
url: https://dev-api.echo.dimigo.in
tags:
- main
production-deploy:
image: docker:latest
stage: deploy
only:
- master
when: manual
script:
- docker login -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD $DIMIGOIN_REGISTRY
- docker push $PRO_IMAGE_TAG
environment:
name: test
url: https://api.echo.dimigo.in
tags:
- main