In my build settings I need to have an environment variable set to a value for all branches except for the release branch, which uses a different value. Tried to do this by adding this in the Settings section:
- MY_ENV_VAR, value1, Only available to the “branch123” branch
- MY_ENV_VAR, value2, Available to all branches
In the build log for the “branch123” branch, I see:
Setting environment variables from repository settings
export MY_ENV_VAR=value1 export MY_ENV_VAR=value2
It is like the one available to all branches is overwriting the one specific for the branch. This was unexpected and seems not to be consistent.
So the question is: what is the precedence when defining the same variable in the Settings section multiple times for different -or all- branches?