# Send Sonarqube results as env variables?

**URL:** <https://community.sonarsource.com/t/send-sonarqube-results-as-env-variables/64092>\
**Category:** SonarQube Server / Community Build\
**Tags:** jenkins, sonarqube\
**Created:** [May 31, 2022, 12:57pm UTC](https://community.sonarsource.com/t/send-sonarqube-results-as-env-variables/64092 "2022-05-31T12:57:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kazwell](https://avatars.discourse-cdn.com/v4/letter/k/3bc359/32.png) [@Kazwell](https://community.sonarsource.com/u/Kazwell)\
**Post date:** [May 31, 2022, 12:57pm UTC](https://community.sonarsource.com/t/send-sonarqube-results-as-env-variables/64092/1 "2022-05-31T12:57:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [May 31, 2022, 7:06pm UTC](https://community.sonarsource.com/t/send-sonarqube-results-as-env-variables/64092/2 "2022-05-31T19:06:56Z")

</div>

Hi,

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](https://docs.sonarqube.org/latest/project-administration/webhooks/) push your QG status straight there?

&nbsp;  
HTH,  
Ann

---

<div class="post-metadata">

**Author:** ![Kazwell](https://avatars.discourse-cdn.com/v4/letter/k/3bc359/32.png) [@Kazwell](https://community.sonarsource.com/u/Kazwell)\
**Post date:** [June 1, 2022, 8:43am UTC](https://community.sonarsource.com/t/send-sonarqube-results-as-env-variables/64092/3 "2022-06-01T08:43:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [June 8, 2022, 8:43am UTC](https://community.sonarsource.com/t/send-sonarqube-results-as-env-variables/64092/4 "2022-06-08T08:43:42Z")

</div>

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