From cd013fc1eeb3df8ead18f699fc558797c7685723 Mon Sep 17 00:00:00 2001 From: Gary Tierney Date: Tue, 16 Jul 2019 18:27:40 +0100 Subject: [PATCH] Publish SonarQube analysis from Azure CI --- azure-pipelines.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index af4cf36b..2167045f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -11,23 +11,35 @@ steps: path: $(GRADLE_USER_HOME) displayName: "Gradle: setup build cache" + - task: SonarCloudPrepare@1 + inputs: + SonarCloud: 'apollo-rsps-sonarcloud' + organization: 'apollo-rsps' + scannerMode: 'Other' + displayName: "SonarCloud: prepare analysis" + - task: Gradle@2 displayName: "Gradle: build" inputs: workingDirectory: '' gradleWrapperFile: 'gradlew' - gradleOptions: '-Xmx3072m -Dorg.gradle.parallel=true -Dorg.gradle.caching=true' + gradleOptions: '-Xmx3072m -Dorg.gradle.parallel=true -Dorg.gradle.caching=true -Dsonar.host.url=https://sonarcloud.io' javaHomeOption: 'JDKVersion' jdkVersionOption: '1.8' jdkArchitectureOption: 'x64' publishJUnitResults: true testResultsFiles: '**/TEST-*.xml' - tasks: 'check jacocoTestReport' + tasks: 'check jacocoTestReport sonarqube' - script: | ./gradlew --stop displayName: "Gradle: stop daemon" + - task: SonarCloudPublish@1 + inputs: + pollingTimeoutSec: '300' + displayName: "SonarCloud: publish quality gate" + - script: | bash <(curl -s https://codecov.io/bash) -t "${CODECOV_TOKEN}" env: