# Query on sonarcube tasks

**URL:** <https://community.sonarsource.com/t/query-on-sonarcube-tasks/133701>\
**Category:** SonarQube Server / Community Build\
**Created:** [January 20, 2025, 10:40am UTC](https://community.sonarsource.com/t/query-on-sonarcube-tasks/133701 "2025-01-20T10:40:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sk8228402](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/sk8228402/32/65394_2.png) [@sk8228402](https://community.sonarsource.com/u/sk8228402)\
**Post date:** [January 20, 2025, 10:40am UTC](https://community.sonarsource.com/t/query-on-sonarcube-tasks/133701/1 "2025-01-20T10:40:14Z")

</div>

Would you kindly state under which circumstances the pipeline will fail if we utilize the **Analyze SonarQube** job in our build pipeline with **Sonar way** Quality Gate is used by default?

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [January 21, 2025, 9:54am UTC](https://community.sonarsource.com/t/query-on-sonarcube-tasks/133701/2 "2025-01-21T09:54:57Z")

</div>

Breaking the Quality Gate will not make the pipeline fail unless you explicitly set [`sonar.qualitygate.wait=true`](https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/ci-integration/overview/#quality-gate-fails)

---

<div class="post-metadata">

**Author:** ![sk8228402](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/sk8228402/32/65394_2.png) [@sk8228402](https://community.sonarsource.com/u/sk8228402)\
**Post date:** [January 21, 2025, 10:43am UTC](https://community.sonarsource.com/t/query-on-sonarcube-tasks/133701/3 "2025-01-21T10:43:27Z")

</div>

SonarQubePublish@6 what does this task will do exactly?  
**Sonar way** Quality Gate this one and SonarQubePublish@6 these 2 are same or different?

And

sonar.qualitygate.wait=true if we set like this , does this cause the pipeline to fail always?

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [January 22, 2025, 2:13pm UTC](https://community.sonarsource.com/t/query-on-sonarcube-tasks/133701/4 "2025-01-22T14:13:04Z")

</div>

> [@sk8228402](#):
>
> SonarQubePublish@6 what does this task will do exactly?

From the [docs](https://docs.sonarsource.com/sonarqube-cloud/advanced-setup/ci-based-analysis/sonarcloud-extension-for-azure-devops/):

> - **Publish Quality Gate Result** task: To display the quality gate status in the build summary and give you a sense of whether the application is ready for production “quality-wise”.

It looks like this when the QG is passing:

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/4/c/4c5d786f7f108ad75b0abada08721b5bc46dc3f2.png)

It does not fail the build. It just posts the status in the build summary.

> [@sk8228402](#):
>
> sonar.qualitygate.wait=true if we set like this , does this cause the pipeline to fail always?

If the Quality Gate has failed, it will fail the pipeline.

---

<div class="post-metadata">

**Author:** ![sk8228402](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/sk8228402/32/65394_2.png) [@sk8228402](https://community.sonarsource.com/u/sk8228402)\
**Post date:** [January 23, 2025, 9:07am UTC](https://community.sonarsource.com/t/query-on-sonarcube-tasks/133701/5 "2025-01-23T09:07:17Z")

</div>

I see as below:

here qualty gate is failed, my question is that if I merge it with release branch then our release build pipeline will not fail due to this issue?

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [January 23, 2025, 9:46am UTC](https://community.sonarsource.com/t/query-on-sonarcube-tasks/133701/6 "2025-01-23T09:46:50Z")

</div>

Have you configured `sonar.qualitygate.wait=true`?

If yes – your pipeline will fail, assuming the result of the merge is that the quality gate of your release branch fails  
If no – it will not fail.

---

<div class="post-metadata">

**Author:** ![sk8228402](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/sk8228402/32/65394_2.png) [@sk8228402](https://community.sonarsource.com/u/sk8228402)\
**Post date:** [January 23, 2025, 9:57am UTC](https://community.sonarsource.com/t/query-on-sonarcube-tasks/133701/7 "2025-01-23T09:57:40Z")

</div>

I did it like below :  
I have removed this line from my code and did not mention anything for sonar.qualitygate.wait
