-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
30 lines (26 loc) · 1.18 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
stages: # List of stages for jobs, and their order of execution
- build
- deploy
build-job: # This job runs in the build stage, which runs first.
tags:
- go-test
stage: build
script:
- go build -o /home/dy-build/dy-api-gateway ./service/api-gateway/.
- go build -o /home/dy-build/dy-user-info ./service/rpc-user-info/.
- go build -o /home/dy-build/dy-user-comm ./service/rpc-user-operator/rpc-user-comment/.
- go build -o /home/dy-build/dy-user-favo ./service/rpc-user-operator/rpc-user-favo/.
- go build -o /home/dy-build/dy-user-relation ./service/rpc-user-relation/.
- go build -o /home/dy-build/dy-video ./service/rpc-video-operator/.
deploy-job: # This job runs in the deploy stage.
stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
script:
- (ps -ef | grep dy | grep build | grep -v grep | awk '{print "kill "$2}' | sh) && true=0 || false=1
- /home/dy-build/dy-api-gateway &
- /home/dy-build/dy-user-info &
- /home/dy-build/dy-user-comm &
- /home/dy-build/dy-user-favo &
- /home/dy-build/dy-user-relation &
- /home/dy-build/dy-video &
- echo Finish
- exit 0