I’ve been trying to hook Drone up to a private Python repository so as to use it as a default for all ‘pip’ installs. According to the ‘pip’ docs, ‘pip’ will respect a PIP_INDEX_URL environment variable if set. So I’m tying to figure out how to set that variable for all builds.
The first way I found was using the DRONE_RUNNER_ENVIRON environment variable. Unfortunately, there’s a known issue (bug?) with the configuration library Drone uses. Putting a URL in the variable results in an error:
error="envconfig.Process: assigning RUNNER_DRONE_RUNNER_ENVIRON to Environ: converting ‘PIP_INDEX_URL:https://piprepo/’ to type map[string]string. details: invalid map item: “PIP_INDEX_URL:https://piprepo/”
See https://github.com/kelseyhightower/envconfig/issues/84. They mention workarounds there, but it would have to be implemented in Drone.
I also came across DRONE_GLOBAL_ENVIRON, but it no longer seems available in 1.0+.
Are there any other options for setting global environment variables?