Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The publish keyword publishes (uploads) a file or folder as a pipeline artifact that other jobs and pipelines can consume.
The publish keyword publishes (uploads) a file or folder as a pipeline artifact that other jobs and pipelines can consume.
Important
The publish step is supported on Azure DevOps Services only. If you use it on Azure DevOps Server, you'll receive an error message similar to Pipeline Artifact Task is not supported in on-premises. Please use Build Artifact Task instead. Use Publish Build Artifacts if you're using Azure DevOps Server.
steps:
- publish: string # Required as first property. The publish step is a shortcut for the PublishPipelineArtifact@1 task. The task publishes (uploads) a file or folder as a pipeline artifact that other jobs and pipelines can consume.
artifact: string # Artifact name.
condition: string # Evaluate this condition expression to determine whether to run this task.
continueOnError: boolean # Continue running even on failure?
displayName: string # Human-readable name for the task.
target: string | target # Environment in which to run this task.
enabled: boolean # Run this task when the job runs?
env: # Variables to map into the process's environment.
string: string # Name/value pairs
name: string # ID of the step.
timeoutInMinutes: string # Time to wait for this task to complete before the server kills it.
retryCountOnTaskFailure: string # Number of retries if the task fails.
steps:
- publish: string # Required as first property. The publish step is a shortcut for the PublishPipelineArtifact@1 task. The task publishes (uploads) a file or folder as a pipeline artifact that other jobs and pipelines can consume.
artifact: string # Artifact name.
condition: string # Evaluate this condition expression to determine whether to run this task.
continueOnError: boolean # Continue running even on failure?
displayName: string # Human-readable name for the task.
target: string | target # Environment in which to run this task.
enabled: boolean # Run this task when the job runs?
env: # Variables to map into the process's environment.
string: string # Name/value pairs
name: string # ID of the step.
timeoutInMinutes: string # Time to wait for this task to complete before the server kills it.
Definitions that reference this definition: steps
Properties
publish string. Required as first property.
The publish step is a shortcut for the PublishPipelineArtifact@1 task. The task publishes (uploads) a file or folder as a pipeline artifact that other jobs and pipelines can consume.
artifact string.
Artifact name.
condition string.
Evaluate this condition expression to determine whether to run this task.
continueOnError boolean.
Continue running even on failure?
displayName string.
Human-readable name for the task.
target target.
Environment in which to run this task.
enabled boolean.
Run this task when the job runs?
env string dictionary.
Variables to map into the process's environment.
name string.
ID of the step. Acceptable values: [-_A-Za-z0-9]*.
timeoutInMinutes string.
Time to wait for this task to complete before the server kills it.
Note
Pipelines may be configured with a job level timeout. If the job level timeout interval elapses before your step completes, the running job (including your step) is terminated, even if the step is configured with a longer timeoutInMinutes interval. For more information, see Timeouts.
retryCountOnTaskFailure string.
Number of retries if the task fails.
Remarks
The publish keyword is a shortcut for the Publish Pipeline Artifact task.
Important
The publish step is supported on Azure DevOps Services only. If you use it on Azure DevOps Server, you'll receive an error message similar to Pipeline Artifact Task is not supported in on-premises. Please use Build Artifact Task instead. Use Publish Build Artifacts if you're using Azure DevOps Server.
Learn more about publishing artifacts.
Examples
steps:
- publish: $(Build.SourcesDirectory)/build
artifact: WebApp
displayName: Publish artifact WebApp