sonar-scanner-msbuild icon indicating copy to clipboard operation
sonar-scanner-msbuild copied to clipboard

Cleanup the SonarQube.Integration.target file in a different way

Open csaba-sagi-sonarsource opened this issue 2 years ago • 2 comments
trafficstars

The problem with the current approach is that if the build fails, users don't run the end step (not to push partial results) so the target file is not removed. This can cause our analyzers to be involved in other builds that the users were not planning to analyze. Issues reported by the community:

  • https://community.sonarsource.com/t/sonarcloud-analysis-registration-not-always-cleaned-up-properly/82351
  • https://community.sonarsource.com/t/sonarqube-impacting-seperate-agent-job/12328

csaba-sagi-sonarsource avatar Mar 17 '23 17:03 csaba-sagi-sonarsource

From Scanner Monthly;

  • The stub is always left in the common folder (for when build agents share the same CI machine).

  • The "link" is in the working directory (the other target files; the stub finds this link via environment variables). When the build fails, the working directory is not cleaned.

  • scope: self-hosted Azure agents with multi-step pipelines.

ToDo: narrow down the problem