No analyses found in this build even though analysis was successfully generated

I’m using:
Enterprise Edition Version 9.7.1 (build 62043) with Azure DevOps Server 2020 Update 1.1

SonarQubePrepare@5 task in Azure Devops YML pipeline:

- task: SonarQubePrepare@5
    displayName: "Prepare analysis on SonarQube"
    inputs:
      SonarQube: SonarQube
      scannerMode: "MSBuild"
      configMode: "manual"
      projectKey: "Decoder"
      projectName: "Decoder"
      projectVersion: "1.0"
      extraProperties: |
        sonar.inclusions=Decoder/**
        sonar.cs.vstest.reportsPaths=$(Common.TestResultsDirectory)\*.trx
        sonar.cs.vscoveragexml.reportsPaths=$(Common.TestResultsDirectory)\**\*.coveragexml
        sonar.exclusions=Decoder/E2ETesting/**, Decoder/Utils/**, Decoder/AutomationCompareHelper/**, Decoder/DecodingService.Json/**, Decoder/Tests/**, 
        Decoder/DCR.Infra.Ioc/**, Decoder/DecodingService.SelfHosting/**, Decoder/**/*BootStrapper.cs

followed by

- task: MSBuild@1
    displayName: "Build Decoder solution"
    inputs:
      solution: '$(Build.SourcesDirectory)\$(SolutionPath)\$(SolutionName)'

then by

- task: SonarQubeAnalyze@5
    displayName: "Run Code Analysis"

and by

- task: SonarQubePublish@4
    inputs:
      pollingTimeoutSec: "300"

LOGS in SonarQubeAnalyze:

INFO: Analysis report generated in 1485ms, dir size=1.0 MB

INFO: Analysis report compressed in 6593ms, zip size=820.6 kB

INFO: Analysis report uploaded in 94ms

INFO: ANALYSIS SUCCESSFUL, you can find the results at: http://sonarqube.mycompany.local:9000/dashboard?id=Decoder&pullRequest=38170

INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report

INFO: More about the report processing at http://sonarqube.mycompany.local:9000/api/ce/task?id=AYkbwyItr2frmonM8mXS

INFO: Analysis total time: 51.847 s

I get these logs in SonarQubePublish task ( NOTICE it can not find the analysis even thoug previous task generated the analysis ):

##[warning]No analyses found in this build! Please check your build configuration.
SYSTEMVSSCONNECTION exists true
SYSTEMVSSCONNECTION exists true
##[warning]Failed to create a build property. Not blocking unless you are using the Sonar Pre-Deployment gate in Release Pipelines. Exception : Error: self signed certificate in certificate chain
Finishing: SonarQubePublish

WHY it can not find the analysis ?

Found the problem, it was the latest 5.15.0 version from SonarQubeAnalyze plugin which was causing the issue.
I’ve specified the exact version to use i.e. 5.13.0 and it worked again.

Hello @flowbrain , thank you for reaching out to the community

I notice that there is a mix of version 4.x.x (Publish) and 5.x.x (Prepare, Analyze). Could you please bump your SonarQubePublish task to the major version 5 and see if this one works with the latest version of the two others?

We can then investigate further if that does not work

More information about the resolution in this thread.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.