mbecker20 / komodo

🦎 a tool to build and deploy software on many servers 🦎
https://komo.do
GNU General Public License v3.0
1.74k stars 34 forks source link

[Feature] Self hosted builders with ephemeral build environments #53

Open C0untZero opened 2 months ago

C0untZero commented 2 months ago

At the moment, if we designate a local server as a builder, the repo build expects the build tools to already be available. It would be nice if there was a way to:

  1. somehow define the needed build tools in the repo configuration itself
  2. make the build environment ephemeral Point 2 is there because builders can also double as deployment servers and I imagine we'd want to keep the deploy environments clean of any needed build dependencies.

This could potentially be solved by utilizing docker itself - a repo configuration could define an image where the repo would be cloned and built. As per our Discord discussion, this could be done by Komodo building a temporary Dockerfile in the repo and filling it with the configured FROM and RUN <onclone cmd / onpull cmd>. Alternatively it may be possible to use docker attach, where Komodo would spin up a container from the defined image, perform docker attach on it, and then execute all further commands directly there.

FoxxMD commented 6 days ago

This could also be achieved, somewhat, by using act to run github action workflows. It follows the behavior you described (isolated build environment in container). Advantage being github workflows already exist and are well supported with the obv disadvantage being the workflows are not agnostic.