azure-devopsazure-pipelinesazure-pipelines-yamlazure-pipelines-tasks

I want to publish a zip file and then download it directly from Azure Artifact feed. Which task will help me do that?


I want to zip and publish a set of changelog files (changelogs i have added to the artifacts using PublishPipelineArtifact), making them available for all users to download directly from the Azure Artifacts feed. Users should be able to download the uploaded ZIP file simply by using the direct download option in the Azure Artifacts feed, without needing to use Azure CLI commands.

I was using UniversalPackages@0task for publishing as zip but for downloading i needed to use Azure cli commands. But I could not download the zip file as direct download when using UniversalPackages@0.

In short, what I wanted is that after publishing the zip file to Azure Artifact feed I want to download it from a direct download button. So the users can download it without using cli comments.

How can I achieve this?

Please find the screenshots of the above mentioned:

I have published the changelogs to the artifacts:

artifact

Then zip and published the zip file mentioned to the Azure Artifact Feed.

feed screenshot

Then want to download the zip file from a download button from the feed, but in the above case I cannot see a download button. Screenshot of example download button.

downloadbutton

I have referred the question : How to store zip file artifact in azure artifact feed

The answers were mentioned about how to publish the zip file using UniversalPackages task, I was using the same task for publishing the zip file to Azure Artifact feed, but I could not see a download button inside the Azure Artifact feed.


Solution

  • Unfortunately, there isn't a download feature built into the UI because it wasn't designed to do what you want. Azure Artifacts is designed as a package repository to be used by tooling: npm, maven, nuget, azure-cli. There's an authentication mechanism protecting the artifacts which requires tooling to access it.

    You're also not the first person to request this. A quick google shows many hits, most of these are Stack Overflow:

    There's also an outstanding request to add a download button feature dating back to 2019. I'm going out on a limb to say that the feature isn't likely going to happen.

    So instead of trying to make the tooling do something it's not supposed to be used for, I'd like to go back and ask why you need the helm deployment log to be permanently stored in azure artifacts. Keep in mind, pipeline artifacts cost you nothing, Azure Artifacts are billable.

    There are better alternatives.