- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
Latest SonarQube 8.1-beta docker version for Developer edition
Jenkins LTS 2.190.3
SonarQube plugin 2.11
- what are you trying to achieve:
We are migrating from Coverity to Sonarqube, for C/C++ analysis.
Jenkins Coverity plugin is providing great integration with Jenkins:
- a global instance configuration
- a tool global & per-node configuration to specify location of local analyzer (similar to build-wrapper + sonnar-scanner)
- “build-step wrappers” that basically start the analyzer before actually calling either batch/shell to listen to everything happening during the Jenkins job. This is quite handy to enable analysis on Jenkins without impacting build script content. Projects can just use it as a replacement for “Execute using windows batch / Execute Shell” build steps
I’ve seen something similar for MSBuild, but are there such kind of integration for Sonarqube build-wrapper?
As a SonarQube & Jenkins user who needs to use build-wrapper to enable C/C++ analysis, i would expect to have a very similar feature than SonarScanner for MSBuild integration, maybe just one build step “SonarScanner for build-wrapper - Windows batch” (and “SonarScanner for build-wrapper - Execute shell”)
- allow to provide sonar configs, especially sonar.cfamily.build-wrapper-output
- providing the regular text box to store build script
- automatically starting build-wrapper (defined in global / node tool properties) --out-dir sonar.cfamily.build-wrapper-output " cmd /c call C:\Users\jenkins\AppData\Local\Temp\jenkins8160427382440937034.bat (which is a internal temporary jenkins file created automatically containing the full content of the build script text box)