Publish Pipeline Artifacts task
Use this task in a pipeline to publish your artifacts(note that publishing is NOT supported in release pipelines. It is supported in multi-stage pipelines, build pipelines, and yaml pipelines).
Looking to get started with build artifacts? See Artifacts in Azure Pipelines.
# Publish pipeline artifacts # Publish (upload) a file or directory as a named artifact for the current run - task: PublishPipelineArtifact@1 inputs: #targetPath: '$(Pipeline.Workspace)' # Required #artifactName: 'drop' # Optional #artifactType: 'pipeline' # Required. Options: pipeline, filepath. Default value: pipeline #fileSharePath: '\server\folderName' # Required when artifactType = filepath #parallel: false # Optional. Default value: false #parallelCount: 1 # Optional. Value must be at least 1 and not greater than 128. Default value: 8
download keywords are shortcuts for the Publish Pipeline Artifact task. You can use them in your pipeline to publish and download artifacts. For more information, see Publish and Download in the YAML schema.
|targetPath||Path to the folder or file you want to publish. The path must be a fully qualified path or a valid path relative to the root directory of your repository. (Required) See Publishing artifacts.|
|artifactName||Your artifact name. You can specify any name you prefer. E.g.:
|artifactType||Artifacts publish location. Choose whether to store the artifact in Azure Pipelines, or to copy it to a file share that must be accessible from the pipeline agent. (Required). Options: pipeline, filepath. Default value: pipeline|
|fileSharePath||The file share to which the artifact files will be copied. This can include variables. Required when
|parallel||Select whether to copy files in parallel using multiple threads for greater potential throughput. If this setting is not enabled, one thread will be used. (Optional). Default value: false|
|parallelCount||Enter the degree of parallelism, or number of threads used, to perform the copy. (Optional) The value must be at least 1 and not greater than 128.|
Q: I'm having issues with publishing my artifacts. How can I view the detailed logs?
To enable detailed logs for your pipeline:
- Edit your pipeline and select Variables
- Add a new variable with the name
Q: Which variables are available to me?
$(Agent.BuildDirectory) are just few of the variables you can use in your pipeline. Variables are available as expressions or scripts.
This task is open source on GitHub. Feedback and contributions are welcome.