Hi! I’m looking to integrate Datadog Quality Gates, specifically the datadog-ci gate evaluate (https://docs.datadoghq.com/quality_gates/setup/#invoking-quality-gates) command, as a pre-deployment check in my workflow. My goal is to prevent deployments if the Quality Gate evaluation fails.
Current setup:
GitHub repository containing an SPA built with Vue and Vite.
Permanent branches include staging and production.
Netlify automatically triggers deployments when new commits are pushed to these branches.
Desired Integration:
I want to introduce a Quality Gate that will block deployments if the datadog-ci gate evaluate command returns a failure. I’m considering writing a GitHub Action for triggering deployments that would,
The documentation indicates that it “Fails if one or more blocking rules fail”, which would then prevent the rest of the build command from executing and Netlify from deploying.
This would have the advantage of preventing builds even if manually triggered by the Netlify UI.
However if you cannot get it to run on Netlify, or just don’t want to, then you could implement it as you’ve indicated.
Thanks for the reply. I don’t think datadog-ci would be available on any Netlify runner out of the box, so there’ll be an install step involved (@datadog/datadog-ci - npm (npmjs.com)). In fact, that is one of the reasons I’ve decided to go with Github actions. But the Netlify Github Actions workflows haven’t been updated in years, hence my hesitation to use them.
Let me know if you have any suggestions. Thank you!
Oh okay. Just to clarify, I’m trying to install datadog-ci as a global npm package so I call it before I run my app’s build command i.e. pnpm build. The doc link you shared seems to be explaining the process of adding dependencies to the app itself. Please let me know if I’m getting it wrong.