Skip to content

Commit

Permalink
#143 : Start wiring up SonarCloud
Browse files Browse the repository at this point in the history
  • Loading branch information
gazbert committed Dec 11, 2021
1 parent c4ddf94 commit 5c78e9b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,10 @@ jobs:
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Build with Gradle
run: ./gradlew build
- name: Gradle build & SonarCloud analysis
run: ./gradlew build jacocoTestReport sonarqube --info
env:
# Needed to get some information about the pull request, if any
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SonarCloud access token should be generated from https://sonarcloud.io/account/security/
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
9 changes: 9 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ allprojects {
apply plugin: 'checkstyle'
apply plugin: "com.github.spotbugs"
apply plugin: "jacoco"
apply plugin: "org.sonarqube"

group = 'com.gazbert.bxbot'
version = '1.2.1-SNAPSHOT'
Expand Down Expand Up @@ -171,6 +172,14 @@ subprojects {
check.dependsOn jacocoTestCoverageVerification
}

sonarqube {
properties {
property 'sonar.host.url', 'https://sonarcloud.io'
property 'sonar.organization', 'gazbert-github'
property 'sonar.projectKey', 'gazbert_bxbot'
}
}

// TODO: Strip out common stuff into separate method?
task buildZipDist(type: Zip, dependsOn: build) {

Expand Down

0 comments on commit 5c78e9b

Please sign in to comment.