Compare commits
2 Commits
d7887c5334
...
bc0ea7b674
Author | SHA1 | Date |
---|---|---|
黄昕 | bc0ea7b674 | |
黄昕 | f47a0ea26b |
|
@ -1,25 +1,45 @@
|
||||||
# 本次构建的阶段: compile、package、deploy
|
# 本次构建的阶段: compile、package、deploy
|
||||||
stages:
|
stages :
|
||||||
|
- sonarqube-check
|
||||||
- compile
|
- compile
|
||||||
- package
|
- package
|
||||||
|
|
||||||
|
sonarqube-check :
|
||||||
|
stage : sonarqube-check
|
||||||
|
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
|
||||||
|
allow_failure: true
|
||||||
|
only :
|
||||||
|
- merge_requests
|
||||||
|
- master
|
||||||
|
- main
|
||||||
|
- develop
|
||||||
|
|
||||||
# 编译
|
# 编译
|
||||||
compile:
|
compile :
|
||||||
stage: compile
|
stage : compile
|
||||||
tags:
|
tags :
|
||||||
- linux-maven
|
- linux-maven
|
||||||
only:
|
only :
|
||||||
- master
|
- master
|
||||||
script:
|
script:
|
||||||
- echo "=============== 开始编译任务 ==============="
|
- echo "=============== 开始编译任务 ==============="
|
||||||
- mvn compile
|
- mvn compile
|
||||||
|
|
||||||
# 打包
|
# 打包
|
||||||
package:
|
package :
|
||||||
stage: package
|
stage : package
|
||||||
tags:
|
tags :
|
||||||
- linux-maven
|
- linux-maven
|
||||||
only:
|
only :
|
||||||
- master
|
- master
|
||||||
script:
|
script:
|
||||||
- echo "=============== 开始打包任务 ==============="
|
- echo "=============== 开始打包任务 ==============="
|
||||||
|
|
3
pom.xml
3
pom.xml
|
@ -15,6 +15,9 @@
|
||||||
<description>CommonFramework</description>
|
<description>CommonFramework</description>
|
||||||
<properties>
|
<properties>
|
||||||
<java.version>17</java.version>
|
<java.version>17</java.version>
|
||||||
|
<sonar.projectKey>cmhi_commonframework_79d69580-8b80-4c2c-aff6-b289255ae16a</sonar.projectKey>
|
||||||
|
<sonar.projectName>CommonFramework</sonar.projectName>
|
||||||
|
<sonar.qualitygate.wait>true</sonar.qualitygate.wait>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
Loading…
Reference in New Issue