加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.gitlab-ci.yml 1.35 KB
一键复制 编辑 原始数据 按行查看 历史
陈涛 提交于 2023-02-15 11:08 . * Change CI configuration.
stages:
- sonarqube
- unit-test
- ui-test
- package
- cleanup-packages
- notify
program-static-analysis:
stage: sonarqube
image:
name: sonarsource/sonar-scanner-cli:latest
entrypoint: [""]
variables:
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task
cache:
key: "${CI_JOB_NAME}"
paths:
- .sonar/cache
script:
- sonar-scanner -Dsonar.inclusions=$(git diff --name-only HEAD~1|tr '\n' ',') -Dsonar.analysis.user=${GITLAB_USER_LOGIN}
allow_failure: true
only:
- master # or the name of your main branch
unit-test:
stage: unit-test
script:
- "/home/gitlab-runner/bin/zentao-unittest.sh ${CI_PROJECT_DIR}"
allow_failure: true
only:
- master
- merge_requests
ui-test:
stage: ui-test
script:
- "/home/gitlab-runner/bin/zentao-uitest.sh ${CI_PROJECT_DIR}"
allow_failure: true
only:
- master
- merge_requests
package:
stage: package
script:
- make cizip
allow_failure: true
only:
- master
cleanup-packages:
stage: cleanup-packages
script:
- make clean
when: on_failure
only:
- master
notify:
stage: notify
script:
- "/home/gitlab-runner/bin/ci-notify.php"
when: on_success
only:
- master
- merge_requests
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化