Showing posts with label CI/CD. Show all posts
Showing posts with label CI/CD. Show all posts

Wednesday, March 8, 2023

How to publish artifacts in Azure DevOps pipeline

Everyone is interested in viewing the artifacts, such as logs and execution reports after the pipeline execution is complete.

Use the following lines of code in the YAML file to upload the artifacts after the execution.

$(System.DefaultWorkingDirectory) -- is the current project directory

-   taskPublishBuildArtifacts@1
        conditionalways()
        inputs:
            pathToPublish$(System.DefaultWorkingDirectory)\logs
            artifactNameYour artifact name
        displayNameprovide your display name