0
votes

"az pipelines runs artifact download --run-id 10976432 --artifact-name "Android/Android" --path "c:/foo/" fails with error "Artifact with name 'Android' was found, but is of type 'Container'"

I publish artifacts from our build runs to several different repositories like NPM, Nuget, PyPi, CoCoPods, and this process requires "two factor authentication", so at least for now it will remain a manual post build process for us.

But even though this is a manual process, I want to automate as much of it as I can, e.g. automating the download a dozen or more build run artifacts to a local staging directory that I then use to publish from.

I have found several community post that have done this with CURL and the REST apis, but I want to get this working with the az devops extention.

As far as I can tell from the azure extension this command should work, but it does not! How can I download build run artifacts (not public feed artifacts), so that I can manually or automatically publish them outside for the normal DevOps pipeline?

Thanks,

Brian.

1
cross linking to my matching GitHub issue report... github.com/Azure/azure-cli-extensions/issues/1466Brian Mouncer

1 Answers

1
votes

"Artifact with name 'Android' was found, but is of type 'Container'"

I guess the publish task you are using is Publish Build Artifacts task, right? If yes, as the message shown, we indeed does not support download container type artifacts until now.

As of today, you can just download artifacts of type -'Pipeline Artifact' from az cli.

In order to use az cli to download artifacts successfully , if possible, please go replace the publish task with Publish Pipeline Artifact task:

- task: PublishPipelineArtifact@1
  inputs:
    targetPath: '$(Pipeline.Workspace)'
    artifact: 'AzLogicApp'
    publishLocation: 'pipeline'

Now, you will see you can succeed to download the artifact with az cli.