SonarCloud Quality Gate Enforcement in Vercel

Hello! So I have sonar cloud integrated with my Bitbucket CI/CD. We have since moved from Bitbucket’s CI/CD driven deployment to using Vercel tied to our Bitbucket for deployment. Meaning, the Bitbucket CI/CD (where sonarcloud is) is running in tandem with Vercel’s deployment. It leaves to be that a failed quality gate, does nothing to stop a Vercel Deployment. Is there a way, possibly, to tell vercel to wait, exploit the Sonar API to get a status of the gate, then have Vercel deploy to production if pass? I would assume using Vercel’s serverless function to fetch from Sonarcloud API, but I don’t see any documentation about this. Any insight would be helpful! Thanks everyone.

Hi,

Welcome to the Community!

You’re looking for the sonar.qualitygate.wait parameter.

 
HTH,
Ann