Setup ‘Sitecore Habitat’ to ‘Azure DevOps’ repository!-Part 2

Sivalingaamorthy Subramaniam
4 min readSep 16, 2018

--

Image from https://burst.shopify.com/communication

For those who are experienced, this article steps may be familiar to you! The beginners who want to learn, how to add a Visual Studio project into VSTS, this article will be helpful. If you have already added the Sitecore Habitat project to ‘Azure DevOps’ repository, feel free to move to Part 3.

Part 1: Setup Sitecore Habitat with Sitecore 9.0 Update 2 in 30 Minutes!

Part 2: Setup ‘Sitecore Habitat’ to ‘Azure DevOps’ repository!

Part 3: Setup ‘Azure DevOps’ CI build for Sitecore Habitat

Part 4: Setup ‘Sitecore PaaS’ using Azure Marketplace!

Part 5: Setup ‘Azure DevOps’ CD/Release build for Sitecore Habitat

In the previous article you might have seen how to setup the ‘Habitat’ solution in you local system.

In this article you are going to see how to add Sitecore Habitat to ‘Azure DevOps’.

  1. Create Project (New) ‘SitecoreDevOpsHabitat’
Create Project
Name your Project

2. Select Repository ‘SitecoreDevOpsHabitat’, you will see the message that it is empty and you can add the ‘Readme.md’ file to Repository.

The default repository name will have project name ‘SitecoreDevOpsHabitat’.

Add the Readme.md file

3. After adding ‘Readme.md’ file, you see the repository with Readme.md

Check if the Readme.md added.

4. Open Visual Studio, In team explorer ‘Manage Connections’ click Connect to the Project ‘SitecoreDevOpsHabitat’ and clone.

  • Select your hosted Repository (for me, I am using …..@hotmail.com)
  • Select the Repository
  • Set the Clone Path Name as ‘D:\Code\SitecoreDevOpsHabitat’ and click Clone (ensure the folder is empty before you clone)

5. Now a new folder ‘D:\Code\SitecoreDevOpsHabitat’ would have got created with readme.md file from the online repository.

Azure DevOps Repository contents are cloned.

6. Copy the Habitat solution contents to ‘D:\Code\SitecoreDevOpsHabitat’, if you are following the previous article, copy the folder contents from folder ‘D:\Download\Sitecore\Habitat-1.6\Habitat-1.6’, now ‘D:\Code\SitecoreDevOpsHabitat’ will look like below!

  • Overwrite the Readme.md file.

7. (optional) Rename the Solution name to differentiate the solution. I prefer this option because it helps to identify the solution name required easily in visual studio.

  • Solution Renamed from ‘Habitat.sln’ to ‘HabitatForDevOps.sln’

5. Open the ‘HabitatForDevOps.sln’ from ‘D:\Code\SitecoreDevOpsHabitat’.

8. When you open the solution automatically all the projects/files will appear as changes (99*), now add the pending changes to the ‘SitecoreDevOpsHabitat’ repository.

  • Click 99*, it will show the files that are pending to be committed in to the repository.
  • Update the Commit message ‘Baseline’ and select ‘Commit All and Sync’, so that the changes from the local repository will get remote sync.
  • On successful commit, you will see the confirmation message.

9. Check your ‘Azure DevOps’ repository, whether you see the committed changes are reflecting (refresh multiple times if committed files are not reflecting).

10. You completed added the Habitat Solution to VSTS/Azure DevOps repository.

Happy Coding.

--

--

Sivalingaamorthy Subramaniam
Sivalingaamorthy Subramaniam

Written by Sivalingaamorthy Subramaniam

Techie by profession, having decade and half, years of experience. Nature lover, interested in travel, hiking!

No responses yet