mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-06 23:52:12 +01:00
Jenkins: Tell SQ 2.0.0-m3 is the base branch for now
This commit is contained in:
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@@ -40,7 +40,6 @@ node() { // No specific label
|
||||
|
||||
def sonarQube = new SonarQube(this, 'sonarcloud.io')
|
||||
|
||||
// TODO move this to ces-build-lib so we can use "sonarqube.analyzeWith(mvn)" here
|
||||
analyzeWith(mvn)
|
||||
|
||||
if (!sonarQube.waitForQualityGateWebhookToBeCalled()) {
|
||||
@@ -59,6 +58,9 @@ node() { // No specific label
|
||||
mailIfStatusChanged(commitAuthorEmail)
|
||||
}
|
||||
|
||||
// Change this as when we go back to default - necessary for proper SonarQube analysis
|
||||
String mainBranch = "2.0.0-m3"
|
||||
|
||||
void analyzeWith(Maven mvn) {
|
||||
|
||||
withSonarQubeEnv('sonarcloud.io') {
|
||||
@@ -77,9 +79,9 @@ void analyzeWith(Maven mvn) {
|
||||
"-Dsonar.pullrequest.bitbucketcloud.repository=sonarcloudtest "
|
||||
} else {
|
||||
mvnArgs += " -Dsonar.branch.name=${env.BRANCH_NAME} "
|
||||
if (!"default".equals(env.BRANCH_NAME)) {
|
||||
// Avoid exception "The main branch must not have a target" on master branch
|
||||
mvnArgs += " -Dsonar.branch.target=default "
|
||||
if (!mainBranch.equals(env.BRANCH_NAME)) {
|
||||
// Avoid exception "The main branch must not have a target" on main branch
|
||||
mvnArgs += " -Dsonar.branch.target=${mainBranch} "
|
||||
}
|
||||
}
|
||||
mvn "${mvnArgs}"
|
||||
|
||||
Reference in New Issue
Block a user