Hi,
Since yesterday we are facing below error during SonarCloud “Publish Quality gate” step. all other steps are executing fine and this pipeline was working since so many months
Error
Task : Publish Quality Gate Result
Description : Publish SonarCloud’s Quality Gate result on the Azure Pipelines build result. To be used after the actual analysis.
Version : 1.9.0
Author : sonarsource
Help : More Information
##[error][SQ] Task failed with status FAILED, Error message: Java heap space
Finishing: Publish Quality Gate Result
To remeidate that i manually exported environment variable using bash script as
export SONAR_SCANNER_OPTS="-Xmx3062M"
export SONAR_RUNNER_OPTS="-Xmx3062M"
Even added below lines in Prepare SonarCloud analysis steps as well
sonar.web.javaOpts="-Xmx2048m"
sonar.ce.javaOpts=-Xmx2048m
SONAR_SCANNER_OPTS="-Xmx3062M"
SONAR_RUNNER_OPTS="-Xmx3062M"
Even using powershell to manually add this property in Sonar-project.properties
(Get-Content D:/a/1/.sonarqube/out/sonar-project.properties) | ForEach-Object { $_ -replace “-Xmx1024M”, “-Xmx3192M” } | Set-Content D:/a/1/.sonarqube/out/sonar-project.properties
Still it is not working. Using Azure pipeline Windows 2019 agent and tried with hosted VS2017 agent as well.
Tried verbose and not getting any logs in publish task(publish quality gate). As checked it Run was using 1024m