I can't reference multiple variable groups from within the yaml pipeline editor. It seems like only the first variable group is picked up unless I manually link the second group through the visual editor.
variables:
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Thank you for your feedback. I have passed this on to the product team for advice.
@alicejgibbons I am sorry. We are not able to repro the issue.
The azure-pipelines.yaml I used is at https://github.com/shashban/extensions/blob/master/azure-pipelines.yml and was able to print variable values from two separate variable groups linked in the yml file.
Can you please point us to the pipeline definition where this didn't work?
Looking at the example, I only see one group being used
- group: test
how does this show the use of multiple, separate variable groups?
I guess @shashban rushed too much to close the issue. I agree @AnticliMaxtic and still wondering whether or not is possible to use multiple groups in the YAML file.
Please, clarify.
@shashban please re-open this issue, I need to access multiple variable groups in my build
Not even one variable group works for me. If I add the groups through the visual editor, the second group overwrites the first one but it works (so it's not an authorization issue nor a group/vault issue).
I tried a very simple pipeline:
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
group: vault1
steps:
- checkout: none
- task: Bash@3
inputs:
targetType: 'inline'
script: 'echo $mysecret | base64'
env:
mysecret: $(mysecret)
It echoes JChteXNlY3JldCkK ($(mysecret) in base64).
I need to be able to use multiple variables groups for different stages in the same pipeline (with the same variable names).
@shanoor you're missing a hyphen. Should be:
variables:
- group: name
@shashban please re-open this issue, I need to access multiple variable groups in my build
@kenkuo Did you manage to use multiple variable groups in your build?
Fyi for all that read this
```trigger:
pool:
vmImage: 'ubuntu-latest'
variables:
This allows multiple variable groups
Most helpful comment
Fyi for all that read this
```trigger:
pool:
vmImage: 'ubuntu-latest'
variables:
```
This allows multiple variable groups