Is there a way to instruct Netlify to skip a build other than using the “[skip ci]” tag? This tag conflicts with other CI tools such as Travis, which provides this same functionality:
In many cases I want to run a Travis build but not deploy through Netlify, but the fact that both services use the same keyword makes that impossible at the moment.
Travis allows variations such as “[skip travis]” so as not to conflict with other services when you only want to target their service. Would it be possible to do the same with Netlify by adding “[skip netlify]” as an allowed keyword to trigger skipped builds?
I filed this as feature request. That feature request is now cross-linked with this community topic.
If/when this feature gets added, we will follow-up here to let you know about it.
Also, I was thinking about approaching this with a different solution. We could completely disable the build at Netlify. You can then install the Netlify CLI tool in the Travis build image and deploy the build to Netlify directly from Travis using the CLI:
This is a well supported use case and one of the intended purposes of the Netlify CLI tool. It is intended to “play nicely” with other CI pipelines.
To disable the builds at Netlify we must unlink the repo from the site manually here in support. If you want us to do this, reply here anytime (and let us know which site to do this for).
If you wanted to relink the repo and site again in the future, this can be done by going to the Netlify web UI at “Site Name” > Settings > Build & deploy and then relinking the same repo to the site again there.
Please let us know if there are any other questions about this.
The alternative solution is an interesting idea, but I don’t think it will help me in this case. That’s not your fault, I just didn’t provide the entire context behind what I needed.
I’m using dependabot to manage my dependencies, which automatically creates PRs for new package versions and then merges them when the build is green. It relies on a green Travis build to decide whether to merge the PR. However, since I’m not interacting with these PRs whatsoever, there is no reason to build a Netlify preview of these minor updates. I maintain a number of open-source projects that rely on this workflow, and it is wasteful of me to utilize Netlify’s resources in this way when it’s completely unnecessary. So it’s not that I need Travis to trigger Netlify builds for me, it’s just that I need dependabot to be able to tell Netlify to skip certain PRs while still having Travis build. Having a unique skip command like [skip netlify] would ensure that any developer, for any reason, can specifically instruct Netlify to skip a build without impacting other CI platforms.
I look forward to having this feature land! Hopefully, it’s not a large piece of work, since the platform already looks for [skip ci]. That string detection can just check for multiple variations now!
Hi @AxleHellfire I’m curious what an ideal solution would look like for you? how are you planning on telling our build system to ignore a build? I suspect that this would be an interesting use-case for a pre-build script that runs before your actual build and stops your build from running if it detects something, like maybe that the PR was opened by dependabot.
FYI we’ve just added detection for [skip netlify] in the commit message, as another way to skip builds only at Netlify. We’re still getting the docs updated, but it will work the same as [skip ci], described here