2

I have a variable group called versions, with one variable named dev, with a value of 0.0.0. I am trying to update the value of this variable when the pipeline runs.

azure-pipeline.yml

- task: AzureCLI@2
  displayName: Update environment variable
  inputs:
    azureSubscription: '<Azure Connection Name>'
    scriptType: 'bash'
    scriptLocation: 'inlineScript'
    inlineScript: |
      'az pipelines variable-group variable update
      --group-id 83
      --name dev
      --org <Organization Name>
      --project <Project Name>
      --value d0.0.3'

When I run this, it fails and gives me an error saying:

--group-id 83
--name dev
--org <Organization Name>
--project <Project Name>
--value d0.0.3: No such file or directory
##[error]Script failed with exit code: 127
/usr/bin/az account clear
Finishing: Update environment variable

I made sure that I have full access to the variable group. What would cause this error? I made sure my values were accurate so I assume I'm missing something within this script.

agw2021
  • 266
  • 2
  • 22
  • how did you make sure that the task has the right permission? I am always getting an "do not have permissions to perform this operation" error and am not sure what else to add to the variable group. – Bennimi Jun 10 '22 at 20:46

0 Answers0