tilt-dev / tilt.build

Tilt landing page
https://tilt.dev/
Apache License 2.0
22 stars 61 forks source link

How to combine multiple Tiltfiles with their own config #1141

Closed saithis closed 10 months ago

saithis commented 10 months ago

As the title says, we have multiple services in different repositories and want to add a Tiltfile with config in each of them. The services can be used independently.

But we also want to have one Tiltfile that can start multiple services together. If I try to include the other Tiltfiles from the main Tiltfile I get Error in config.define_bool: config.define_bool cannot be called after config.parse is called.

So how would I handle this case?

nicks commented 10 months ago

the pattern we usually see is to put flags in the "entrypoint" tiltfiles (which contain flags) and factor out the shared components into tiltfiles that are sub-included or installed as extensions. here's a guide: https://docs.tilt.dev/multiple_repos