How to get emailed for every failure quality gate failure?

We’re currently running code analysis via jenkins as such:

dotnet sonarscanner begin /k:“microservices” /d:“sonar.login=${SONAR_TOKEN}” /o:“ptp” /v:“$GIT_COMMIT” /d:“sonar.host.url=https://sonarcloud.io” /d:“sonar.cs.dotcover.reportsPaths=./dotCover.Output.html”
dotnet restore Microservices.sln
dotnet build Microservices.sln
dotnet-dotcover test --dcReportType=HTML --dcLogLevel=Verbose --dcLogFile=/dotcoverlogs/dotcover_log.txt ./Microservices.sln
dotnet sonarscanner end /d:“sonar.token=${SONAR_TOKEN}”

We’d like to get an email every time quality gates fail - either from jenkins or from sonar cloud. I thought I could do that by enabling notifications in the sonar cloud portal

But I’ve done that and re-run our jobs with a quality gate that fails and I get no email. So how can we know (without signing into the portal) when we’ve got a failure?

Thanks
Brad

Hi Brad,

Welcome to the community!

We only email for changes in the Quality Gate status, so:

analysis 3 - pass 
analysis 4 - fail -> email
analysis 5 - pass -> email
analysis 6 - fail -> email
analysis 7 - fail 
analysis 8 - fail 
analysis 9 - pass -> email

If you want to get emails for re-fails, you’ll need to automate that outside of SonarCloud.

 
HTH,
Ann

I see this change like fail and then pass, but still we don’t receive any email notifications. We have enabled them in my account in sonarcloud. Please suggest.

Hi,

You’ve resurrected an 8 month-old thread.

Per the FAQ, please don’t do that. Please create a new thread with all your details.

 
Thx,
Ann