Send Sonarqube results as env variables?

Hello everyone,
I’m using Sonarqube Developer Edition 9.2.4 , and I integrated it with Jenkins, everything is working the way it “should” be.
My only question is that if there is any way to view Sonarqube results from Jenkins? For example, in Jenkins, there is a environment variable currentBuild that let you display the project name, the build result,etc.
I was wondering if Sonarqube offer similar variables? We are using a webhook to push results from Jenkins to Rocket.Chat, Jenkins’ variables work fine, but I can’t make it work with Sonarqube, is it even possible? Something like Total time, Status, and scores?
I’m really new to all of this so I apologize if my query isn’t clear.


Welcome to the community!

If the end goal is to get your Quality Gate status into Rocket.Chat, perhaps you could just have SonarQube’s own webhooks push your QG status straight there?


1 Like

That’s the solution I came to after a while yes.
But it turns out the seniors rather have everything go through jenkins, so I was told returning the gate status alone was enough.
Thanks for your reply, much appreciated.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.