Setup ‘Sitecore Habitat’ to ‘Azure DevOps’ repository!-Part 2
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’.
- Create Project (New) ‘SitecoreDevOpsHabitat’
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’.
3. After adding ‘Readme.md’ file, you see the repository with Readme.md
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.
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.