是否可以在分析过程中设置声纳中的默认分支?

问题描述 投票:0回答:1

我们有许多旧项目都有主默认分支,但新项目正在使用 main。目前,我们想保留两个默认分支。是否可以在分析过程中告诉声纳默认分支是什么?

我们正在GitLab中使用maven进行分析,这是maven命令:

mvn --batch-mode --no-transfer-progress -Dmaven.repo.local=.m2/repository -Dsonar.qualitygate.wait=true -B -Dformats=HTML,JSON \
    -Dsonar.branch.name=$CI_COMMIT_REF_NAME \
    -Dsonar.dependencyCheck.jsonReportPath=target/dependency-check-report.json \
    -Dsonar.dependencyCheck.htmlReportPath=target/dependency-check-report.html \
    -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco-unit.xml,target/site/jacoco/jacoco-it.xml \
    compile sonar:sonar
sonarqube gitlab-ci sonarqube-scan
1个回答
0
投票

尝试传递分支名称参数

-Dsonar.branch.name=<your-branch-name>
© www.soinside.com 2019 - 2024. All rights reserved.