Closed sppatel closed 2 years ago
Yeah, good idea. You would think that CLI library they use to parse arguments would have built-in functionality to easily support driving arguments by environment variables. Similar to https://pkg.go.dev/gopkg.in/alecthomas/kingpin.v2#ArgClause.Envar
TURBO_TOKEN
TURBO_API
TURBO_TEAMID
Works for me to configure the custom remote process.env.STORAGE_PATH = 'fluent-turborepo-cache';
Looks like it's undocumented but the config setup uses https://github.com/kelseyhightower/envconfig process anything prefixed with TURBO_
Not sure how it all maps up my Go is a little rusty
https://github.com/vercel/turborepo/blob/main/cli/internal/config/config.go#L115
Sounds like https://github.com/vercel/turborepo/issues/1324#issuecomment-1213557555 has answered the question. Closing this out unless anything else is needed!
Describe the feature you'd like to request
The following env variables are supported today for use by a CI configuration (e.g GHA).
TURBO_TOKEN TURBO_TEAM TURBO_REMOTE_ONLY
However for users using a custom cache server - would be good to also provide TURBO_API to avoid having to pass though --api on all commands.
The current solution is to drop in a config.json inside .turbo directory with the team and api url. However, for security purposes use different api urls for a shared cache between developers vs CI.
Describe the solution you'd like
Support a TURBO_API environment variable to set the --api for caching requests.
Describe alternatives you've considered
The current solution is to swap out the config.json during CI with the different URL (vs what is used for development).