0
votes

I have a variable group e.g. 'vargroup' with 3 variables (env ,envid, envpwd) in azure devops. i have declared the variable group in my yaml definiton too. If i use inline bash script these variables are being recognized and works fine. However when I use the same script but located in the repository, the script does not recognize the variables in variable group.

variables:
- group: vargroup

- task: Bash@3
  inputs:
    filePath: 'script.sh'

my script calls these variables as $(env) , $(envid) , $(envpwd) .

what's the correct way to use the variables from variable group in a script path method?