Open stefanes opened 3 years ago
I think you forgot to pass {project}
name like this --route-parameters project=xxxxx
in your script.
I think you forgot to pass
{project}
name like this--route-parameters project=xxxxx
in your script.
This is an organisation scoped feed, so the {project}
parameter should not be supplied.
The issue is the area nuget
is not unquie.
if you do GET https://dev.azure.com/hmcts/_apis/ResourceAreas
you will find two.
the az devops invoke
will choose the first it finds which is
{
"id": "9d3a4e8e-2f8f-4ae1-abc2-b461a51cb3b3",
"name": "nuget",
"locationUrl": "https://artifacts.dev.azure.com/hmcts/"
}
This is not the one I guess you want, as I am having the same issue.
{
"id": "b3be7473-68ea-4a81-bfc7-9530baaa19ad",
"name": "nuget",
"locationUrl": "https://pkgs.dev.azure.com/hmcts/"
}
This means the Resouce doesn't match.
if you add --debug
at the end you can see the request`
bug has been raised here https://github.com/Azure/azure-devops-cli-extension/issues/1012
Can confirm having the same issue. Any workarounds?
Describe the bug
Adding a NuGet package to a view fails using
az devops invoke
. Using--area nuget
seems to direct the call toartifacts.dev.azure.com
instead ofpkgs.dev.azure.com
causing the command to fail.Is this caused by duplicate
nuget
areas listed byhttps://dev.azure.com/{org}/_apis/ResourceAreas
(one referencingartifacts.dev.azure.com
, and one referencingpkgs.dev.azure.com
)? Or how can I make the command go look at the correct area?az devops invoke --org {org} --query "[?area=='nuget' && resourceName=='Versions']"
:REST API: https://docs.microsoft.com/en-us/rest/api/azure/devops/artifactspackagetypes/nuget/update%20package%20version?view=azure-devops-rest-6.1
Command Name
az devops invoke Extension Name: azure-devops. Version: 0.18.0.
Errors:
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az devops invoke --api-version 6.1-preview --area nuget --org {org} --resource Versions --route-parameters feedId={feedId} packageName={packageName} packageVersion={packageVersion} --http-method PATCH --in-file body.json --output json
body.json
:Expected Behavior
Package is added to the provided view.
Environment Summary
Additional Context