Home
> DevOps > Azure DevOps (ADO) | Pipelines | Publish and Access Build Artifacts from Staging Directory
Azure DevOps (ADO) | Pipelines | Publish and Access Build Artifacts from Staging Directory
In this article, Lets see how to Publish and Access Build Artifacts using ADO Pipeline.
What are Build Artifacts:
- Build artifacts are the files generated by your build.
- In ADO Pipelines, We can use Build.ArtifactStagingDirectory Predefined Variable, on the agent where any artifacts are copied to.
Below are the steps to Publish and Download the Build Artefacts in a ADO Pipeline.
Steps to Publish the Build Artefacts:
- Lets see how to Publish a file to Build Artifacts folder, using following ‘Power Platform Export Solution’ Task.
- In the below Task, I am exporting a Solution from CRM Instance and publishing as $(Build.ArtifactStagingDirectory)\$(SolutionName)_managed.zip by using the ‘Solution Output File’ property.
- In the above the ‘Solution Output File’ property, $(SolutionName) is my custom defined ‘Pipeline Variable’ contains Solution name.
- ‘ALM_Base’ is my Dynamics Instance Solution name.
- And $(Build.ArtifactStagingDirectory) is Predefined Variable.
- Once the pipeline runs successfully, you can download the published artefacts (i.e., Solution folder) as follows.
Steps to Download the Build Artefacts:
- Go to Pipeline Runs and select the last run.
- Click on the below highlighted link.
- Select the folder you want to download.
- We also have an option to commit these files to Git using ‘Command Line Script’ task.
🙂
Comments (0)
Trackbacks (0)
Leave a comment
Trackback