Skip to content

Commit

Permalink
ES-1657/set sonar to run on default branch (#1610)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanbrereton authored Apr 17, 2024
1 parent 05fba75 commit 26a84d2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .ci/JenkinsfileSonarCloud
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ pipeline {

stages {
stage('SonarQube analysis') {
when {
expression { return env.BRANCH_NAME == gitUtils.getDefaultBranch(gitUtils.getRepoName())}
}
steps {
withSonarQubeEnv('SonarCloud') {
sh './gradlew sonar -Si'
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ plugins {
alias libs.plugins.dokka
alias libs.plugins.dependency.check.versions // discover possible dependency version upgrades
alias libs.plugins.cyclonedx.bom apply false
id "org.sonarqube" version "4.4.1.3373"
alias libs.plugins.sonar
}

snyk {
Expand Down
4 changes: 3 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ gradleEnterpriseVersion = "3.16.2"
grgitVersion = "5.2.2"
snykVersion = "0.5"
taskTreeVersion = "3.0.0"
sonarVersion = "4.4.1.3373"

[libraries]
slf4j = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4jVersion" }
Expand Down Expand Up @@ -90,4 +91,5 @@ kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlinVersion" }
kotlin-allopen = { id = "org.jetbrains.kotlin.plugin.allopen", version.ref = "kotlinVersion" }
kotlin-jpa = { id = "org.jetbrains.kotlin.plugin.jpa", version.ref = "kotlinVersion" }
snyk = { id = "io.snyk.gradle.plugin.snykplugin", version.ref = "snykVersion" }
task-tree = { id = "com.dorongold.task-tree", version.ref = "taskTreeVersion" }
task-tree = { id = "com.dorongold.task-tree", version.ref = "taskTreeVersion" }
sonar = { id = "org.sonarqube", version.ref = "sonarVersion" }

0 comments on commit 26a84d2

Please sign in to comment.