forked from cubefs/cubefs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
51 lines (46 loc) · 1.06 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
before_script:
- go version
- echo $CI_PROJECT_DIR
- export GOPATH=/export/workspace/go
- echo $GOPATH
- export CFS_SRC_PROJECT=$GOPATH/src/github.com/chubaofs
- export CFS_SRC_PATH=${CFS_SRC_PROJECT}/chubaofs
- export CI_HOME=/export/App/cfsci
- echo ${CI_COMMIT_REF_NAME}
- rm -fr ${CFS_SRC_PATH}
- ln -s $CI_PROJECT_DIR ${CFS_SRC_PROJECT}
- echo ${CI_PROJECT_DIR} ${CFS_SRC_PATH}
- cd ${CFS_SRC_PATH}
stages:
- build
- deploy
- restart
- ltptest
build_main:
stage: build
tags:
- cfs
script:
- sh /export/App/cfsci/scripts/build.sh
deploy:
stage: deploy
tags:
- cfs
script:
- sh /export/App/cfsci/scripts/deploy.sh
restart:
stage: restart
tags:
- cfs
script:
- sh /export/App/cfsci/scripts/stop-ltp.sh
- sh /export/App/cfsci/scripts/stop-client.sh
- sh /export/App/cfsci/scripts/stop-server.sh
- sh /export/App/cfsci/scripts/start-server.sh
- sh /export/App/cfsci/scripts/start-client.sh
ltptest:
stage: ltptest
tags:
- cfs
script:
- sh /export/App/cfsci/scripts/start-ltp.sh