DevOps for your Organization – Part 2: Creating Your Repository
In our previous post, we covered Code Vanguard’s DevOps process and reviewed the immediate and long-term benefits that we have seen with our clients. In this post, we will be going through the steps for setting up and connecting to an Azure DevOps git repository. By the end of this post, we will have:
- Created a git repository in Azure DevOps
- Connected your Visual Studio instance to your Azure DevOps repository
Create an Azure DevOps Git Repository
First, we will need to create an Azure DevOps git repository to hold the code that we will be building and deploying. While Microsoft has an excellent resource on creating your git repository, I will also be covering the basics below.
So, to set up your repository:
1. Navigate to your Azure DevOps site. It will either be https://<your organization>.visualstudio.com or https://dev.azure.com/<your organization>/ depending on how your account is set up.
2. Click on the Repo button (highlighted below)
3. From the repo dropdown on the header bar, select New repository.
4. Fill out the details about your new repository:
5. Click Create and your new repository should be ready!
Keep this page open, as we will need it in the next step.
Connect Visual Studio 2019 to Azure DevOps
There are many ways for you to connect to your newly created repository and manage the code there. In this post, we will be demonstrating how to connect Visual Studio 2019 Preview.
1. Open Visual Studio 2019. At the welcome screen, click on Clone or checkout code.
2. Get the URL for your repository from Azure DevOps. If you still have your repository open from the previous section, there should be a button in the upper-right corner that says Clone.
In the pop-up box, click the copy button:
3. Use that URL in the Clone or checkout code VS 2019 dialog and click Clone. Note the location where you cloned the repository; we will need it in the next post when we’re creating our project.
4. This should open Visual Studio, and if this is the first time you’ve connected to Azure DevOps, you may get a dialog asking you to authenticate to the website. And that’s it! You should now see the repository in your Team Explorer panel.
Now that we have our repository set up, we are ready to add our demo code and check it in to Azure DevOps. Check out our next post to see how to create a demo ASP.NET Core Web Application project and check it in to our Azure DevOps repository.
This post is part of the DevOps for your Organization series, where we walk through some basic steps you can take to move your organization towards the DevOps process. The full series can be found here. If you’d like Code Vanguard to help your organization with its DevOps process, feel free to reach out to us!