Unable to download pipeline artifacts in azure devops download artifacts task

Azure Devops Pipeline Artifacts | Download Pipeline Artifacts in Azure Devops | Troubleshooting download of pipeline artifacts in Azure Devops

Sanjeevi Subramani's photo
Sanjeevi Subramani

Published on Dec 11, 2020

1 min read

Subscribe to my newsletter and never miss my upcoming articles

Unable to download pipeline artifacts in Azure Devops Download artifacts task

When build artifacts are published using publish build artifacts in azure devops yaml pipeline got error that unsupported artifact type is passed when downloading with Download Artifacts task.

steps:

  • script: ./buildSomething.sh
  • task: CopyFiles@2 inputs: contents: ‘_buildOutput/**’ targetFolder: $(Build.ArtifactStagingDirectory)
  • task: PublishBuildArtifacts@1 inputs: pathToPublish: $(Build.ArtifactStagingDirectory) artifactName: MyBuildOutputsWe can’t download those artifacts using download artifacts task below. steps:
  • download: current artifact: WebApp

Because above two are different, one is pipeline artifacts and another one is build artifacts.

Below is task if you want to publish and download Build artifacts both should be used as a combination pair if the combination changed it won't work.

Combination One:

Publish Build artifacts:

steps:

  • script: ./buildSomething.sh
  • task: CopyFiles@2 inputs: contents: ‘_buildOutput/**’ targetFolder: $(Build.ArtifactStagingDirectory)
  • task: PublishBuildArtifacts@1 inputs: pathToPublish: $(Build.ArtifactStagingDirectory) artifactName: MyBuildOutputs

Download Build artifacts

  • task: DownloadBuildArtifacts@0 inputs: buildType: ‘current’ downloadType: ‘single’ artifactName: MyBuildOutputs downloadPath: ‘$(System.ArtifactsDirectory)’

Combination Two:

For using pipeline artifacts for publish and download.

Publish pipeline artifacts

steps:

  • publish: $(System.DefaultWorkingDirectory)/bin/WebApp artifact: WebApp

Download pipeline artifacts

steps:

  • download: current artifact: WebApp

Thanks.

 
Share this