December 17, 2019

Artifact handling in azure for automation code repository

  December 17, 2019
When considering a selenium project in visual studio , Artifacts are basically the files we get in debug/release folder when we build a project.

In Azure platform, these files are called as artifact.

If we run a build pipeline with a repository associated to it, that pipeline will try to fetch the latest committed files in the project and build the project ,these files in the debug folder will be stored under the artifact section.

Lets consider below pipeline.

Here we are taking the latest from the repo and mapping it to our pipeline.

Since we are using this pipeline only for building the project, we can use any azure hosted agent to run this .

Now we can use the build task in Azure to build the solution.

When this job is done, the artifact will be created and we can use Publish Artifact task to copy these file to an Azure location by giving a name.

We also need mention the folder to publish, Usually this will be the debug folder in the project.
This folder can be selected from the button near to Path to publish field.

Eg : MySolution/MyProject/bin/Debug

Mentioning a unique name for the artifact will help us to identify it along with the pipeline.
Setting Artifact publish location as Azure pipeline will store artifact inside Azure itself.

So once the build pipeline is run successfully, we can see below screen and Artifact published will be mentioned in the top.

The commits happened with that particular build with previous build also will be mentioned in the pipeline run.

If we check the agent job, we can get all the details of the tasks happened with the build.

These artifact created with each build will be stored in Azure for some days, in case if we want go back to any previous artifact or if something goes wrong with the current build we could always use those artifacts to run a release.

If we want to add one of our customized file as part of Artifact , we need to mention Copy to output folder option from Visual studio itself.

Visit here for more details on this topic :

Thanks for reading Artifact handling in azure for automation code repository

« Prev Post

1 comment:

Bookmark this website for more workarounds and issue fixes.

Verify Zip file contents without extracting using C# + Selenium

While doing automation testing, we may get a scenario where we need to download a zip file and to validate the contents inside it. One way t...