-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Support az artifacts universal list command #30488
Copy link
Copy link
Open
Labels
Artifactsaz artifactsaz artifactsAuto-AssignAuto assign by botAuto assign by botService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.act-observability-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Metadata
Metadata
Assignees
Labels
Artifactsaz artifactsaz artifactsAuto-AssignAuto assign by botAuto assign by botService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.act-observability-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Related command
The current
az artifacts universalgroup only supports thedownloadandpublishcommands.Is your feature request related to a problem? Please describe.
When using Azure Pipelines, we often want to know if a package version exists in Azure Artifacts, either before downloading it or before publishing a new package. Trying to download a non-existent package version fails, and trying to publish an existing package version also fails.
It is possible to handle download failure in scripts, which is okay, but if what we want to do is publish a version using the UniversalPackage@0 task, and it already then that task will fail.
We have to rely on handling publish failure, instead of testing whether the version exists before publishing the version. When trying to download a package version, we have to rely on handling download failure if a version does not exist.
Describe the solution you'd like
I suggest implementing a command called
az artifacts universal listthat will take a package name as a parameter, and will list zero or more versions. It could potentially use the same API as the web interface that lets us list package versions. The list command could also support a parameter that only returns the selected (latest) version, just like the web ui does.Describe alternatives you've considered
When publishing a new package version using the UniversalPackage@0 task, we have a solution where we attempt to download the artifact in a script before publishing it, and if the download was successful, then we don't publish a new version, but if the download failed, then we publish a new version. This is method is wasteful of pipeline agent's runtime, compute resources and developers' waiting time.
Additional context