tilt-dev/tilt.build

How to combine multiple Tiltfiles with their own config

Closed this issue · 1 comments

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?

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