teamhephy / builder

MIT License
3 stars 12 forks source link

Idea: Asynchronous/detached builds #19

Open Cryptophobia opened 6 years ago

Cryptophobia commented 6 years ago

From @ineu on February 2, 2017 12:55

Sometimes builds can take quite a while, depending on the project size, dependencies, network speed, general cluster utilization etc. All this time connection opened for git push must stay open which is not very convenient. It would be nice to have a way to run builds in background. It could work this way:

  1. User sets some option on the app to make deploys async. Maybe an ENV var.
  2. User performs git push
  3. After the push is finished, receive hooks/scripts do not run the build but rather create some kind of background task which performs a build (k8s job?)
  4. The deis command should have some additional subcommand to track the deployment process. It will return the deployment status and exit, so no long-running connections.
  5. It can also have some kind of 'watch' command to connect to the controller and wait for the deploy to finish.

Another option is to allow to detach from the build process as Heroku does: https://devcenter.heroku.com/articles/git#detach-from-build-process. This approach allows to avoid step 0 above but to me it looks somewhat confusing.

Sorry if this question has been asked before, didn't find it with a quick search.

Copied from original issue: deis/builder#476