Report build status on completion?
As we're working to get our sites set up, one thing we are thinking thru is how to let the team know a build ran (or failed). We expect most builds to be done automatically via webhooks or a github merge, so automating the build reporting is as important as web stats to be sure we know updates are working.
Are there any examples or docs that discuss:
1. is this better done in the app/project itself, so the build command might be
npx @cloudflare/next-on-pages && npm run alert
where alert would be a script we create to send some build details/status? (Downside: that adds to build time and also worry if that fails/throws that an otherwise good build might "fail" on an alert.)
2. can we 1-time-call a worker to send status to an API helping us monitor builds, uptime stats from 3rd parties, etc?
3. we didn't see in docs or the admin screens any hints for sending status or reporting, but maybe we missed it?
The main thing here we want to guard against: (a) our CMS being temporarily unavailable, causing a build to fail or (b) the CMS or other dependency is slow, causing a time-out on build.
I'd guess somebody has solved this problem, so we're happy to hear any stories about how people monitor this to ensure builds aren't failing over and over until somebody on a writing team/using a headless CMS yells "where's my stuff?!?!?!". 🙂2 Replies
Thanks. Sorry I forgot to mention that we had looked at those. They don't give a ton of info, it's email only, and on failure it doesn't give any information that we could use to automate a retry or escalate to a human. So we're trying to look at a way to "instrument" the build so we can track how many builds are being triggered (are the editors getting click-happy on the 'rebuild' button?), track the reasons for failure (our headless CMS slow? bugs slipping thru?), and automate retries for specific situations (like a slow CMS).
We have an enterprise account, so that hopefully won't be the factor here. Are there docs I could use for that?
Ah! As much as your services are awesome, it is sometimes a struggle to find what I need in the menus/docs. Thanks for pointing out what I need. 🙂
Noted! And then double-thanks for helping me!
Agreed! And I will pass your feedback along to the notifications team. I'm glad you were able to find what you were looking for