Conditional running of Build Plugins

I’m aware that there is ongoing work to enable context sensitive build plugins as part of Allow context sensitive build plugins config in netlify.toml · Issue #1169 · netlify/build · GitHub but I was wondering if there was any way to control the running of build plugins based on conditions other than context?

For example, an incoming webhook from a headless CMS will trigger a static site rebuild. For these occasions we might not want to run a particular plugin.

Is there any way to use the build hook metadata to ignore certain hooks when running build plugins?

TIA

Hi @andypattenden,

We haven’t had this request nor have we thought of this specific feature. Would you like to open a feature request in Issues · netlify/build · GitHub describing the different conditional values (e.g. hook payload) that you’d like, and explaining your use case? This will allow us to discuss this feature and prioritize it.

Thanks!