Search code examples
azure-devopsazure-artifacts

Can you list, view or download the contents of an AzureDevOps artifact via the web interface?


In the AzureDevOps web interface, if I look at the feeds for artifacts I see lists of commands to download the artifacts via the azure cli e.g.

az artifacts universal download blah blah blah

But there is no option to list the files or download them directly from the web interface. This seems a surprising omission.

Is it:

  • A) a misconfiguration somewhere?
  • B) a missing feature in the UI?

or

In case it is relevant the artifacts are being produced from an Azure pipeline by using a UniversalPackages task to publish a directory as below:

    - task: UniversalPackages@0
      displayName: 'PublishInstallationPackage'
      inputs:
        command: publish
        publishDirectory: 'pkg'
        versionOption: custom
        versionPublish: $(Build.BuildNumber)
        vstsFeedPublish: 'blah'
        vstsFeedPackagePublish: 'foobar'
        packagePublishDescription: 'It performs a quirkafleeg'
        publishPackageMetadata: true

I discovered that we were accidentally publishing an empty directory but this only seems to be visible when you download the artifact and get no files.

Bonus points if you can suggest a way to detect and fail a build if it publishes an empty directory (the best suggestion so far is to add a task that checks if the directory is empty before publishing).


Solution

  • I see you were trying to download Universal Package. Unfortunately Download Universal Package through Web UI is not supported currently.

    You will need to use the az artifacts universal commands or UniversalPackages task to download in the pipeline. See here.

    Azure DevOps doesn't support direct HTTP/HTTPS download links.

    There are user voices have been submitted to Microsoft development team. You can vote it up or create a new one of your own. See below user voices:

    Download context menu entry not provided for universal packages

    Download Universal Package trough API

    However, Azure devops provides an option to download NPM, Nuget, Maven and Python types of Artifacts package directly from the Web UI.

    With regard to detecting an empty directory. The best way is just as you mentioned Adding a script task to check if the directory is empty before publishing.

    If you want to check the contents of the package. You can add a Publish Pipeline Artifacts task to publish the package as the build artifacts in the publish pipeline.

    enter image description here

    Then you can navigate to the related build to check the package contents from the Artifacts Feed UI. See below:

    enter image description here