Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to control when the build plugin should be run e.g. only on deploy preview #75

Open
jonasthiesen opened this issue Aug 4, 2020 · 4 comments

Comments

@jonasthiesen
Copy link

Is your feature request related to a problem? Please describe.
At the moment the test suite will always run whenever a new deploy is made. This raises to problems:

  1. The test suite will run on the Pull Request AND when the code is merged (essentially running the same tests twice without changes)
  2. The build plugin has to be removed in case a hotfix has to be performed regardless of test status

Describe the solution you'd like
Ability to control when the build plugin will be run. I suppose this could work with the tags that netlify injects: production, deploy-preview or branch-deploy. Then it would be possible to specify the [plugins.inputs] to something like, only-run-on = "deploy-preview" (as an example). Maybe there is a better way to figure out what type of build it is, but I don't know that much about the build plugins.

Describe alternatives you've considered
I know it's a bit limited what Netlify provides to the build plugins, which makes certain solution impossible at the moment.

I'd like to contribute to this if you want, just want to discuss if this is something that would be wanted, and in that case, how it should work 😊

@spamsch
Copy link

spamsch commented Feb 15, 2021

This is especially important since this feature would save a lot of build time that is pretty expensive on Netlify.

@spamsch
Copy link

spamsch commented Feb 15, 2021

This is somehow obsolete if netlify/build#1169 is implemented. @ehmicky any news on that?

@ehmicky
Copy link
Contributor

ehmicky commented Feb 15, 2021

Hi @spamsch,

Thanks for following up.
This feature is in our backlog, but we have not started implementing it yet.

cc @verythorough

@ehmicky
Copy link
Contributor

ehmicky commented Apr 12, 2021

This has been implemented! 🎉

More information in this comment. Please let us know if this works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants