SonarScanner - build wrapper - charon

Im using SonarQube 10.2 on AKS with HELM, trying to get validation of the cfamily code into project, in Jenkins pipeline
SonarScaner is
Jenkins agents run also on AKS

sh 'wget -P /home/jenkins https://WEBPAGE/static/cpp/'
sh 'unzip /home/jenkins/ -d /home/jenkins/workspace'
sh '/home/jenkins/workspace/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir /home/jenkins/workspace/build-wrapper-linux-x86/bw-output/ make clean all'
sh '$SCANNER_HOME/bin/sonar-scanner -X -Dproject.settings=/home/jenkins/workspace/sonarqube_test/PROJECTNAME/src/'

and before I have a stage with charon but not sure if its the correct one to be combined with wrapper

stage('Build') {
                steps {
                    sh '''#!/bin/bash
                        source /opt/charon/bin/
                        charon build-ws -vvv

I want the project to finish the build with wrapper and see all the outcomes in our sonarqube, I know that something needs to be added here but not 100% sure
sh '/home/jenkins/workspace/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir /home/jenkins/workspace/build-wrapper-linux-x86/bw-output/ make clean all'

After some thinking cfamily files / project get downloaded to


How to make this with make / cmake as charon is a specific tool developed inside the company


Welcome to the community!

Sorry, but I’m not quite following. It looks like you’ve already got the build-wrapper command in place with your make command. What’s missing?

As a side note, SonarScanner CLI 4.5.0 has some age on it at this point. You should upgrade.


Thanks for answer, got it working, unfortunately the build command was do extensive and complicated that I had to do compilation database way

1 Like