I came across this article regarding build plugins and on the
onEnd event handler it states, “build finished, site deployed” but I assume from these docs that the
onEnd event is actually after a build but before a deploy?
There is a note about adding future event handlers and I was wondering if you plan to add an event like
onPostDeploy so that the event handler actually only kicks off once the site is deployed?
I could see this being useful for a plugin like this for example and I’m sure there are other cases to run checks on the deployed code.
At the moment, both
onEnd are happening after the site is built but before it is deployed.
We are working on making both events happen after the site is deployed instead. When this happens, we will post an announcement on Netlify Community.
In the meantime, we have migrated existing plugins (including the one you mention) to the upcoming behavior.
That’s great @ehmicky thank you for clearing that up. That’s going to be really useful event handler behaviour for lots of plugins.
Hi @ehmicky We are currently writing our own local build plugin to send messaging to our various Slack channels. Is it possible to have this internal plugin migrated to the new behaviour or is that something that would have to wait because it’s a local plugin?
Unfortunately not. This new behavior is modifying some internals in Netlify Build CI which are used by all builds and all plugins.
Thanks for asking for additional precision there. Cheers!
I was looking at our deploy logs this morning and I noticed a rather pleasant change! Looks like our internal plugin now has the hook firing after the deploy This is fantastic and means our custom Slack plugin is firing alerts to our channels at the right time. Thank you for this update, much appreciated
You were quick to notice it @knoxjeffrey!
We have been rolling this feature out for all plugins indeed. The
onEnd events are now triggered after deploy.