Try to describe the problem or opportunity you are seeing and why it matters. The closer you stick to this topic template, and the more information you provide, the better chance you have to generate a real discussion.
A few questions to help you:
What are you trying to accomplish? > SonarQube Pull Request Decoration with BitBucket
Why does this matter to you? Our Deverloper not able to see Code Analysis in Bitbucket itself even Decoration configured.
How would that look in SonarQube? Alternatives? not sure
How would we know it works well? i can provide logs
Why should it be a priority now? we have deadline to meet project work
Make sure to check out our product roadmap as well, to see if your need is already being considered.
I sent you a private message, please check it next time so we can keep things private in case you have sensitive information. Can you follow-up with the below requests?
It is not Bitbucket pipeline, it is Jenkins Pipeline and I will provide you logs which you have mentioned by re-producing issue.
Even I wont be able to provide you PR decoration screenshot, since it is not getting displayed in Bitbucket portal.
The Jenkinsfile you show is unlike the typical recommendation we suggest:
stage('SonarQube Analysis') {
steps {
sh "cp -R /var/jenkins/hybris ."
sh "cp core-customize/config/local.properties hybris/config/local.properties"
sh "cp core-customize/config/localextensions.xml hybris/config/localextensions.xml"
sh "cp -R core-customize/custom hybris/bin/custom"
sh 'echo "jacoco.base.dir=/var/jenkins/workspace/ace-sx-b2b_${modifiedBranchName}/hybris/data/jacoco" >> hybris/config/local.properties'
sh 'echo "jacoco.lib.loc=/var/jenkins/workspace/ace-sx-b2b_${modifiedBranchName}/hybris/data/jacoco/agent" >> hybris/config/local.properties'
sh 'echo "sonar.coverage.jacoco.xmlReportPaths=/var/jenkins/workspace/ace-sx-b2b_${modifiedBranchName}/reports.xml" >> hybris/config/local.properties'
sh 'echo "sonar.jacoco.reportPaths=/var/jenkins/workspace/ace-sx-b2b_${modifiedBranchName}/hybris/data/jacoco/reports/jacoco2.exec" >> hybris/config/local.properties'
sh 'echo "sonar.branch.name=${BRANCH_NAME}" >> hybris/config/local.properties'
sh 'cat core-customize/config/sonar_local.properties >> hybris/config/local.properties'
sh "chmod -R 777 *"
dir('hybris/bin/platform'){
sh ". ./setantenv.sh && ant clean all && ant sonarcheck"
}
sh "rm -rf hybris"
}
}
I recommend you reformulate your Jenkinsfile by following the project onboarding method by creating a new project and following these steps:
Hi Joe
Thanks for your response. I have already configured Jenkins multibranch pipeline but for “SonarQube Analysis” stage with withSonarQubeEnv we had Java memory error and Ant build tool and configured in Jenkins Declarative Pipeline so did not configure withSonarQubeEnv()
Exception in thread “jenkins.util.Timer [#4]” java.lang.OutOfMemoryError: Java heap space
jenkins.util.ErrorLoggingScheduledThreadPoolExecutor afterExecute
WARNING: failure in task not wrapped in SafeTimerTask
java.lang.OutOfMemoryError: Java heap space