Publish Pipeline Artifacts

Azure Artifacts enable developers to store and manage their packages and control who they want to share it with. Pipeline Artifacts are generally generated after you build your application. The output can then deployed or consumed by another job in your pipeline.

Publish Artifacts

Note

Publish Artifacts is not supported in release pipelines. It is only supported in build pipelines, yaml pipelines, and multi-stage pipelines.

You can publish your Artifacts at any stage of your pipeline using YAML or the classic editor. If you want to publish your Artifacts manually, you can use the Azure CLI to run the az pipelines runs artifact command. You will not be billed for storing your Pipeline Artifacts or Pipeline caching.

steps:
- task: PublishPipelineArtifact@1
  inputs:
    targetPath: '$(Pipeline.Workspace)'
    artifactType: 'pipeline'
    artifactName: 'drop'
  • targetPath: Path to the folder or file you want to publish. (Required)
  • artifactType: Artifacts publish location. (Required). Options: pipeline, filepath. Default value: pipeline.
  • artifactName: Name of your Artifact. (Optional)

Note

The PublishBuildArtifacts@1 task is deprecated, we recommend that you use the PublishPipelineArtifact@1 task for faster performance.

Publish Artifacts from the command line

If you want to manually publish your Artifact, run the following command in an elevated command prompt:

az pipelines runs artifact upload --artifact-name your_artifact_name --path your_path_to_publish --run-id '<artifact_run_id>'

View published Artifacts

When your pipeline run is completed you can view or download your published Artifact as follows

  1. Select your pipeline run, and then select the Summary tab.

  2. Select the published Artifact in the related section.

    View published Artifact

  3. Expand the drop folder and find your Artifact.

    View the drop content

  4. Download your pipeline Artifact and explore its content.