I'm porting some Jenkins builds to Azure Pipelines. One of the port sets involves an arbitrary list of environment variables that constantly changes. In Jenkins I just run an injection script to run on a list file that is within the code base's source and the build references those variables in whatever scripts or build-steps need them. Some of the variables are hard-coded while others reference environment variables of the build itself.
I looked at the Define variables documentation but it either doesn't show a way to accomplish this, or I somehow missed it. How do I go about doing this besides resorting to something like Setx
? I have no way of knowing which build will use which variables so hard-coding them is pointless. The only constant is, I know to look for a root-level file called env-vars.txt
.