forked from XiaoMi/MiNLP
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
34 lines (29 loc) · 924 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
variables:
PROJECT_SSH_URL: "[email protected]:knowledge-base/minlp.git"
HOSTS: $DEPLOY_HOSTS
before_script:
# - export LC_ALL="zh_CN.UTF-8" # 编码问题可能导致测试出错
- fusion-cli config --access-key $ACCESS_KEY --secret-key $SECRET_KEY
stages:
- 测试
- 系统编译
- 系统部署
build:
stage: 测试
script:
- cd duckling-fork-chinese
- sbt clean coverage test
- sbt coverageAggregate
build_branch:
stage: 系统编译
script:
- fusion-cli release build --branch $CI_COMMIT_REF_NAME --version $CI_COMMIT_SHORT_SHA --code $PROJECT_SSH_URL --service $RELEASE_SERVICE --wait
only:
- main
deploy_branch:
stage: 系统部署
script:
- fusion-cli release deploy --branch $CI_COMMIT_REF_NAME --version $CI_COMMIT_SHORT_SHA --pdl $RELEASE_PDL --job $RELEASE_JOB_NAME --service $RELEASE_SERVICE --hosts $HOSTS --wait
only:
- main
when: on_success