In some of my previous post I’ve described what DevTest Labs is, how to set Virtual Machines with Artifacts in DevTest Labs and how you can use and configure VM policies in DevTest Labs. This post will describe how add and set your private VSTS Git Artifacts Repository in DevTest Labs. For now, this is possible only for Visual Studio Team Services, Git and GitHub repository. Artifacts can be items such as actions that you want to run on the VM, tools that you want to install on a VM or some applications that you want to test.
Step 1: Setting VSTS Git repository
In order to set VSTS Git repository you will first need to create a folder for Artifacts under your private Git Repository. This folder will contain all the Artifacts that you are going to create in later steps. This Artifacts can be also shared with other users in the Lab.
1. Open Visual Studio Team Services.
2. Navigate to DevOps folder.
3. Click on your Artifacts folder.
4. On the right side you will see the details of your Artifact folder.
Step 2: Setting the Name of Artifact Repository in the Lab
First you need to set some basic settings such as name of your private VSTS Git Repository. You can choose the name by your choice, just pay attention to use the same name where needed.
1. Navigate to the Lab, which is in this example already open in another tab.
2. Click on Settings tab.
3. From the menu choose Artifact Repository to start with setting details of it.
4. In the right window type the Name of your private VSTS Git Repository.
Step 3: Setting the Git Clone URI of Artifact Repository in the Lab
In this step you will have to set Git Clone URI for your Artifact Repository in your Lab, to get the copy of your Git Repository.
1. Navigate back to VSTS Git Repository.
2. On the right side click on Clone button to see the Clone URI details.
3. Click on Copy symbol to copy the link to clipboard.
4. New pop-up window will appear with notification for allowing the access. Click on Allow Access button.
5. Navigate back to the Lab and paste the link for Git Clone URI.
Step 4: Setting the Folder Path and Personal Access Token in the Lab
The Folder Path is the name of the folder that is described in first step of this tutorial. It is listed under your private Git Repository and you will have to type the exact name of it.
1. In the Folder Path field enter the name of your Artifact folder, exactly as it is shown in Step 1-3. Before the name type symbol /. In this case I’m going to type </Artifacts>
2. In order to set the Personal Access Token, navigate back to VSTS Git Repository.
3. Click on Generate Git Credentials.
4. The window will generate new password. Click on the Copy button on the right side.
5. Navigate back to the Lab.
6. Paste the generated password in the Personal Access Token field.
In previous post you saw that Azure DevTest Labs artifact repository includes already some Artifacts by default. This post described how to set your private VSTS Git artifacts repository in DevTest Labs in simple four steps. In the next post I’m going to describe also how you can set also private Artifacts by using a GitHub Repository. Stay tuned!