Publish Logs as Artifacts

Learn how to publish the automation logs using the PublishBuildArtifacts task.

We know where the logs are located during the pipeline execution:

$(System.DefaultWorkingDirectory)/target/logs

To access them after the pipeline finishes executing, the logs have to be published first by the pipeline as an artifact.

What exactly is an artifact?

An artifact is an output of a pipeline that can be used by another pipeline or by a user. Examples of artifacts are logs, screenshots, and reports.

How can an artifact be generated?

An artifact can be generated by adding a new task to the pipeline:

Get hands-on with 1200+ tech skills courses.