0

If you are aware of Gatsby it has a detailed build process i.e. https://www.gatsbyjs.com/docs/conceptual/overview-of-the-gatsby-build-process/#what-happens-when-you-run-gatsby-build

We have a custom requirement to build a custom react component to display the Gatsby build logs as soon as an user triggers a build at Contentful.

Gatsby cloud does provide an outgoing notification feature

https://support.gatsbyjs.com/hc/en-us/articles/1500000480181-Outgoing-Notifications

where it sends a payload out to our GCP cloud webhook on the events like

on Build Successful and on Build failed however it doesn't have anything for 'Build started'.

To solve this i used gatsy-node.js file where i could send a custom event payload to the above gcp webhook however i've trouble finding the buildid that gatsby sends via outgoing notification. I'm not sure how do we get hold of the buildid.

I've tried Gatsby cloud docs and don't help there.

  • If anyone facing this issue. I managed to fix it by looking up the Gatsby global environment variable "process.env.GATSBY_NODE_GLOBALS["buildId"]" – Sukesh Dash May 30 '23 at 20:51

0 Answers0