microsoft / azuredevopslabs

Learn how you can plan smartly, collaborate better, and ship faster with a set of modern development services with Azure DevOps.
https://www.azuredevopslabs.com
MIT License
826 stars 920 forks source link

The SonarQube code analysis task in our Azure Devops build pipeline yaml getting failed with storage issue in default location #551

Open vowne opened 3 years ago

vowne commented 3 years ago

Issue:- The SonarQube code analysis task in our Azure Devops build pipeline yaml getting failed with below error.

What we tried: We have SonarQube analysis task yaml in our pipeline and there is a maven task which using "clean verify" goal followed by the sonarqube task. when we execute this the maven task getyting failed with the below error.

Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.8.0.2131:sonar on project: Unable to load component interface org.sonar.api.utils.TempFolder: Failed to create temporary folder in /home/vowne/.sonar: /home/vowne/.sonar/.sonartmp_xxxxxxx: No space left on device.

Not sure from where the sonarqube is taking the location from . its taking the users home directory now. /home/vowne. We have enough space in other location and would need to change the sonarqube temp location to there.

Is there something we can add to the maven task or sonar task to change the location of this temp ?

    inputs:
      SonarQube: 'Sonarqube'
      ScannerMode: 'Other'
      extraProperties: |
          sonar.projectName=${{ parameters.myName }}
          sonar.coverage.xxxxxx.xmlReportPaths=$(System.DefaultWorkingDirectory)/xxxxxx/xxxxx/site/xxxxxxx/xxxx.xml
vowne commented 3 years ago

any guidance on this is highly appreciated