-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
58 lines (54 loc) · 1.41 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
image: docker:latest
stages:
- build
- deploy
# push to develop for build image bellow for testing
build_dev:
stage: build
allow_failure: false
script:
- echo 'Start building USER'
- pwd
- docker stop web-ngs-landing-test || true && docker rm web-ngs-landing-test || true
- docker build -t web-ngs-landing-test:v1.0 -f Dockerfile.test .
- docker run -d --restart=always -it -p 8084:3000 --name web-ngs-landing-test web-ngs-landing-test:v1.0
- echo 'build done!'
only:
- develop
- /^dev-.*$/
deploy_dev:
stage: deploy
environment:
name: development
script:
- echo 'script for deploying on DEV'
- pwd
- echo 'DEPLOYED SUCCESSFULLY'
only:
- develop
- /^dev-.*$/
# push to release* for build image bellow for production
build_release:
stage: build
allow_failure: false
script:
- echo 'Start building USER'
- pwd
- docker stop web-ngs-landing-test-prod || true && docker rm web-ngs-landing-test-prod || true
- docker build -t web-ngs-landing-test-prod:v1.0 .
- docker run -d --restart=always -it -p 8086:3000 --name web-ngs-landing-test-prod web-ngs-landing-test-prod:v1.0
- echo 'build done!'
only:
- release
- /^release-.*$/
deploy_prod:
stage: deploy
environment:
name: development
script:
- echo 'script for deploying on DEV'
- pwd
- echo 'DEPLOYED SUCCESSFULLY'
only:
- release
- /^release-.*$/