1. 更新流水线配置

This commit is contained in:
黄昕 2024-03-12 11:05:49 +08:00
parent ae12d68cc5
commit b638918697
1 changed files with 22 additions and 2 deletions

View File

@ -1,6 +1,7 @@
stages :
- sonarqube-check
- compile
- integration-test
- package
# 代码质量检查
@ -17,7 +18,7 @@ sonarqube-check:
paths:
- .sonar/cache
script:
- mvn verify sonar:sonar -DskipTests
- mvn verify sonar:sonar
allow_failure: true
only:
- merge_requests
@ -36,6 +37,25 @@ compile :
- echo "=============== 开始编译任务 ==============="
- mvn clean compile -DskipTests
# 集成测试
integration-test:
stage : integration-test
tags :
- linux-maven
only :
- master
script :
- echo "=============== 开始集成测试 ==============="
- mvn test
artifacts:
when : always
reports:
junit:
- target/surefire-reports/TEST-*.xml
- target/failsafe-reports/TEST-*.xml
dependencies:
- compile
# 打包
package :
stage : package
@ -45,4 +65,4 @@ package :
- master
script:
- echo "=============== 开始打包任务 ==============="
- mvn clean package -DskipTests
- mvn clean package