containerbuildsystem / cachi2

Cachi2 is a CLI tool that pre-fetches your project's dependencies to aid in making your build process network-isolated.
GNU General Public License v3.0
8 stars 26 forks source link

[config] Add support for tuning behaviour with environment variables #573

Open eskultety opened 3 months ago

eskultety commented 3 months ago

Cachi2 is mostly run within containerized environments which commonly prefer configuring the intended workload behaviour via environment variables. We don't have that and instead we only support a config file to be passed via the cachi2 --config-file CLI option. There's a clear benefit in having matching environment variables with the individual config options we have. The idea is to introduce a simple rule that each env variable would be prefixed with e.g. CACHI2_ and the rest of the name would be derived from the actual config option name as it stands in the file.