Azure / azure-devops-cli-extension

Azure DevOps Extension for Azure CLI
https://docs.microsoft.com/en-us/cli/azure/ext/azure-devops/?view=azure-cli-latest
MIT License
617 stars 239 forks source link

az pipelines variable delete does not work with --pipeline-name argument #1323

Open adehaan-rlcm opened 1 year ago

adehaan-rlcm commented 1 year ago

This is autogenerated. Please review and update as needed.

Describe the bug

the bug described in issue https://github.com/Azure/azure-devops-cli-extension/issues/1043 is still present. Doesnot seem to be updated in mentioned issue, therefor (re)opening here. I can confirm that the --pipeline-name still doesnot work, but the --pipeline-id does work. Please update the command to not accept the --pipeline-name argument and update help and documentation. Or (prefereable) solve the bug. Command Name az pipelines variable delete Extension Name: azure-devops. Version: 0.25.0.

Errors:

There were no build definitions matching name "xxxx" in project "xxxx".

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Expected Behavior

Environment Summary

Windows-10-10.0.19045-SP0
Python 3.10.8
Installer: MSI

azure-cli 2.43.0

Extensions:
account 0.2.5
azure-devops 0.25.0

Dependencies:
msal 1.20.0
azure-mgmt-resource 21.1.0b1

Additional Context

daughey commented 7 months ago

This is still a problem in 0.26.0.

It would be useful if at the very least, the official documentation was updated to steer people to the --pipeline-id parameter instead of --pipeline-name.

For anyone after a viable workaround, make a call to az pipelines show and mine the result for the id and use that for az pipelines variable delete.

pwsh:
$id = (az pipelines show --name 'My Pipeline' | ConvertFrom-Json).id
az pipelines variable delete --yes --pipeline-id $id --name 'MyVariable'