Closed jamietanna closed 5 years ago
I'd be a fan. I use gitlab ci for... ci/pipelines, and being able to enable brach/preview deploys would be amazing.
also, how long do those stick around?
We @devinsolutions miss this feature a lot. We deploy several production websites to Netlify, but we use different services (e.g. Google App Engine) for preview deployments because we insist on using our own CI.
Unfortunately, this is not an easy task, although not impossible. The main problem would be to ensure all data required to perform those deploys is present when deploying from a CLI. Deploy Previews for example depend on having a pull request open, and without it, we'd break several assumptions in our API. Branch deploys might be slightly less involved, but they would still require some consideration.
l've opened a ticket in our internal product repository to discuss this feature, but I'm unsure if/when we will implement it.
Our use-case: We would like to run an automated test-runner on base of the just build branch. So we have to options:
@calavera couldn't there be an API to hit at netlify that just requires a branch name and PR link/number? or what if we just want to upload a zip of files? (I build my project for production on gitlab's C.I. and then just upload the built files)
Just adding to this with my current scenario...
I am making a group portfolio site for a graduating design class. I am making a site with GatsbyJS, which creates image thumbnails on build. This site has many fairly-large images, so it must sometimes be deployed with the CLI if there are updates that the cache isn't being cycled from (say, new images under the same name as old ones). Small updates tend to work okay, because I'm using gatsby-plugin-netlify-cache
. This works fine, but only so long as the master
branch is the one being deployed to the prod URL, so that I can deploy from the CLI if there is any issue updating the cache.
This leads to my current issue: I have now deployed a "coming soon" countdown to the main URL and put the master
behind a branch deploy. Unfortunately, this means I can't find a way to deploy the master
from the CLI to its branch URL. I can only deploy either a preview or to --prod
. Unfortunately, deploying to --prod
puts the work-in-progress master
branch onto the public URL.
This is a bit of a complex issue and maybe an edge case, but I hope it shows a scenario in which an option like netlify deploy --branch
would be useful.
Hey @thundernixon (and well others on this thread too I guess). I'd recommend putting your issues on the https://github.com/netlify/cli project. It has eclipsed this project and this project is going into maintenance mode.
@rybit thanks so much for letting me know! Will do.
It seems like https://github.com/netlify/cli/issues/275 is a continuation of this issue, on the current repo.
@sw-yx if netlify/cli#275 has this implemented will it also be ported to this project if this issue is not open?
i wont make any promises about that, this project is in maintenance and we won't be porting things as far as I know. i dont even have a timeline for fixing https://github.com/netlify/cli/issues/275 much less porting a fix. of course, community forks are welcome.
Interesting - I thought this project was the future for CLI interactions with Netlify, not vice versa. Thanks for clarification!
yeah. here's more information about our iteration from js to go back to js: https://www.netlify.com/blog/2018/09/10/netlify-cli-2.0-now-in-beta-/#our-cli-journey
It'd be great to have, as part of CI, a step within the config that's able to run a deploy, instead of going via the Netlify webhook