1. 增加gitlab-ci支持

This commit is contained in:
黄昕 2024-03-07 17:20:57 +08:00
parent 64a993b793
commit 01bbee1b24
1 changed files with 10 additions and 10 deletions

View File

@ -4,22 +4,22 @@ stages :
- package
# 代码质量检查
sonarqube-check :
stage : sonarqube-check
tags :
sonarqube-check:
stage: sonarqube-check
tags:
- linux-maven
image : maven:3-eclipse-temurin-17
variables :
image: maven:3.9.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}"
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 :
script:
- mvn verify sonar:sonar -DskipTests
allow_failure: true
only :
only:
- merge_requests
- master
- main