badges / shields

Concise, consistent, and legible badges in SVG and raster format
https://shields.io
Creative Commons Zero v1.0 Universal
23.41k stars 5.49k forks source link

Badge Request: Azure Artifacts package version #4182

Open clairernovotny opened 4 years ago

clairernovotny commented 4 years ago

Azure Artifacts has public feeds now. Should work for NuGet/Maven/npm (pretty much any kind of package artifact). It should have support for latest stable and latest prerelease.

:microphone: Motivation Other NuGet feed services are supported like MyGet/NuGet. This is another NuGet feed location.

Use case is displaying the latest stable or prerelease package from an Azure Artifacts feed.

calebcartwright commented 4 years ago

Thanks @onovotny, which specific badges would you be looking for (version, downloads, etc.)? I ask as we'll have to figure out if AzDO makes the required data available (for example download counts) to determine the viability of each badge type.

clairernovotny commented 4 years ago

I'm most interested in version. The biggest issue I have is that the built-in badge service Azure Pipelines has only does the latest stable version, not prerelease. Counts could be nice as well but I don't think are as critical.

clairernovotny commented 4 years ago

Here's a public feed: https://dev.azure.com/dotnet/Rx.NET/_packaging?_a=feed&feed=RxNet

One thing to note is that public feeds are scoped to the org whereas private feeds are account-wide. I believe there's an extra path parameter to support that. You can select the Connect to Feed button for it to show you the NuGet/npm/Maven/Gradel/Python specific endpoints.

calebcartwright commented 4 years ago

What's the authentication process like with private feeds? I use AzDO a lot but have never worked with Artifacts.

We support using PATs (with a self-hosted Shields instance) for badges from private Team Projects (build/release status, coverage, test results, etc.)

clairernovotny commented 4 years ago

For private feeds, I think you can use the macOS instructions to use any username and then a PAT as the password:

https://docs.microsoft.com/en-us/azure/devops/artifacts/get-started-nuget?view=azure-devops#macos-add-the-feed-to-your-nuget-configuration

calebcartwright commented 4 years ago

Excellent, thanks!

devhawk commented 4 years ago

+1 for this badge.

Also, note that Azure Artifact feeds have four release views: all, local, prerelease and release packages. Each view has a unique nuget feed. For example, in the Rx.NET artifact feed that @onovotny referenced, the all packages feed url is https://pkgs.dev.azure.com/dotnet/Rx.NET/_packaging/RxNet/nuget/v3/index.json while the release packages feed is https://pkgs.dev.azure.com/dotnet/Rx.NET/_packaging/RxNet%40Release/nuget/v3/index.json. Rx.NET doesn't appear to be using this feature, but seems worth supporting all four views in the badge

devhawk commented 4 years ago

Maybe there should be a generic Nuget Feed badge where the shield user can put in the specific feed they want to use to support any private nuget server like Sleet

devhawk commented 4 years ago

@onovotny does this work for you? I'm going to try this out: https://docs.microsoft.com/en-us/azure/devops/artifacts/package-badges?view=azure-devops

clairernovotny commented 4 years ago

@devhawk the issue with that is that it doesn't show prerelease package versions.

jmarolf commented 4 years ago

@devhawk just ran into this and have the same complaint. nuget.org is where my released packages go. The Azure Artifacts "feature" of not being able to show pre-releases means I need to use myget or some other package source if I want badges to link folks to beat version to try out.

clairernovotny commented 3 years ago

Bump? Any thoughts on this?