Azure Pipeline for SonarCloud analysis using Gradle is successful but no results are published

I have tried to analyze a Java repository, build using Gradle wrapper, and publish the results in my SonarCloud organization. I am using an Azure DevOps Pipeline for the build, however, I cannot see any results in the SonarCloud account, even though my pipeline build is successful. I am using Sonarcloud Prepare task, Sonarcloud Run Analysis and Sonarcloud Publish, as well as Gradle build step with following settings:

  • task: Gradle@2 inputs: gradleWrapperFile: 'gradlew' options: '-P offlineVersion=$(Build.SourceBranchName)-SNAPSHOT' tasks: 'publish' publishJUnitResults: true testResultsFiles: '**/TEST-*.xml' javaHomeOption: 'JDKVersion' jdkVersionOption: '1.8' gradleOptions: '-Xmx3072m' env: RUNONCI: 'true' REPO_USER_NAME: '$(RepoUserName)' REPO_USER_PASSWD: '$(RepoUserPasswd)' SNAPSHOTURL:

Could you please help me out?

I do not receive any error, only 2 warnings:

  • When using Maven or Gradle, don't use the analyze task but instead tick the 'SonarQube' option in the Maven/Gradle task to run the scanner as part of the build.
  • No analyses found in this build! Please check your build configuration.

My goal is to see the analysis results in the SonarCloud account. I have checked and the service connection I am using is verified and correct.



Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation