Publish Pipeline Artifacts
Azure DevOps Services | Azure DevOps Server 2022 | Azure DevOps Server 2020
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
Select your pipeline run, and then select the Summary tab.
Select the published Artifact in the related section.
Expand the drop folder and find your Artifact.
Download your pipeline Artifact and explore its content.
Related articles
Feedback
Submit and view feedback for
and then select Add to add it to your pipeline.