1. 增加gitlab-ci支持
This commit is contained in:
parent
a9ce4ede8f
commit
7652f435ad
|
@ -0,0 +1,48 @@
|
|||
stages :
|
||||
- sonarqube-check
|
||||
- compile
|
||||
- package
|
||||
|
||||
# 代码质量检查
|
||||
sonarqube-check :
|
||||
stage : sonarqube-check
|
||||
tags :
|
||||
- linux-maven
|
||||
image : maven:3-eclipse-temurin-17
|
||||
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 :
|
||||
- mvn verify sonar:sonar -DskipTests
|
||||
allow_failure: true
|
||||
only :
|
||||
- merge_requests
|
||||
- master
|
||||
- main
|
||||
- develop
|
||||
|
||||
# 编译
|
||||
compile :
|
||||
stage : compile
|
||||
tags :
|
||||
- linux-maven
|
||||
only :
|
||||
- master
|
||||
script:
|
||||
- echo "=============== 开始编译任务 ==============="
|
||||
- mvn clean compile -DskipTests
|
||||
|
||||
# 打包
|
||||
package :
|
||||
stage : package
|
||||
tags :
|
||||
- linux-maven
|
||||
only :
|
||||
- master
|
||||
script:
|
||||
- echo "=============== 开始打包任务 ==============="
|
||||
- mvn clean package -DskipTests
|
5
pom.xml
5
pom.xml
|
@ -20,6 +20,11 @@
|
|||
<properties>
|
||||
<cs-package.version>0.0.1-dev</cs-package.version>
|
||||
<java.version>17</java.version>
|
||||
<properties>
|
||||
<sonar.projectKey>cmhi_integrateservice_c87e350f-7272-46e2-b9c3-68d9a9a30a9d</sonar.projectKey>
|
||||
<sonar.projectName>IntegrateService</sonar.projectName>
|
||||
<sonar.qualitygate.wait>true</sonar.qualitygate.wait>
|
||||
</properties>
|
||||
</properties>
|
||||
|
||||
<modules>
|
||||
|
|
Loading…
Reference in New Issue