-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
39 lines (35 loc) · 913 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
stages:
- build
- start
- check
- deploy
build-vinavaCloud:
stage: build
script:
- bash build.sh uat
- docker build --build-arg profile=uat . -t pofo-api
only:
- master
start-vinavaCloud:
stage: start
script:
- docker rm -f pofo-stage-api-new || true
- docker run -d --restart=always --name pofo-stage-api-new --expose 5555 -e VIRTUAL_HOST=pofo-stage-api.vinavalabs.com -t pofo-api:latest uat
only:
- master
check-vinavaCloud:
stage: check
script:
- docker tag pofo-api registry.gitlab.com/vinava/pofo/pofo-api:latest
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker push registry.gitlab.com/vinava/pofo/pofo-api:latest
- bash checkUp.sh
only:
- master
deploy-vinavaCloud:
stage: deploy
script:
- docker rm -f pofo-stage-api || true
- docker rename pofo-stage-api-new pofo-stage-api
only:
- master