This post was used for my workshop at the company. However, it might be an initiative of your own approach for automating Sitecore deployments with Teamcity. (Note: the summary is here)
Setup Prerequisites
- Complete Part 1
What are we gonna do in Part 2?
We will fulfill the value of all the configuration parameters so that the automating deployment will be able to run successfully.
- log into TeamCity
- create the configuration parameters:
- Administration -> Projects -> Viet Hoang – Simple Development Framework -> CA – CD1 – CD2
- left navigation: select Parameters -> Add new parameter
- add configuration parameter vhs.source.folder
- Name: vhs.source.folder
- Value: .
- add configuration parameter vhs.AssemblyVersion
- Name: vhs.AssemblyVersion
- Value: 2.1.0
- repeat #2 to add configuration parameter vhs.configuration
- Name: vhs.configuration
- Value: Release
- repeat #2 to add configuration parameter vhs.gitBranch
- Name: vhs.gitBranch
- Value: Release-2.1.3
- repeat #2 to add configuration parameter vhs.deployIisAppPath_CM
- Name: vhs.deployIisAppPath_CM
- Value: the CM website name in IIS
- repeat #2 to add configuration parameter vhs.deployIisAppPath_CD1
- Name: vhs.deployIisAppPath_CD1
- Value: the CD1 website name in IIS
- repeat #2 to add configuration parameter vhs.deployIisAppPath_CD2
- Name: vhs.deployIisAppPath_CD2
- Value: the CD2 website name in IIS
- repeat #2 to add configuration parameter vhs.msDeployUsername
- Name: vhs.msDeployUsername
- Value:
- repeat #2 to add configuration parameter vhs.msDeployPassword
- Name: vhs.msDeployPassword
- Value:
- repeat #2 to add configuration parameter vhs.msDeployServiceUrl_CM
- Name: vhs.msDeployServiceUrl_CM
- Value: localhost
- repeat #2 to add configuration parameter vhs.msDeployServiceUrl_CD1
- Name: vhs.msDeployServiceUrl_CD1
- Value: localhost
- repeat #2 to add configuration parameter vhs.msDeployServiceUrl_CD2
- Name: vhs.msDeployServiceUrl_CD2
- Value: localhost
- repeat #2 to add configuration parameter vhs.errorOnFail
- Name: vhs.errorOnFail
- Value: true
- repeat #2 to add configuration parameter vhs.forceToPublishWithMsBuild
- Name: vhs.forceToPublishWithMsBuild
- Value: true
- repeat #2 to add configuration parameter vhs.instance.root
- Name: vhs.instance.root
- Value: the full path parent folder of CM/CD1/CD2 website folder
- Ex: CM website root is “F:\Sitecore Training\viethoang.cm.local” then the value is F:\Sitecore Training
- repeat #2 to add configuration parameter vhs.instance.name_CM
- Name: vhs.instance.name_CM
- Value: the name of CM website folder
- Ex: CM website root is “F:\Sitecore Training\viethoang.cm.local” then the value is viethoang.cm.local
- repeat #2 to add configuration parameter vhs.instance.name_CD1
- Name: vhs.instance.name_CD1
- Value: the name of CD1 website folder
- Ex: CD1 website root is “F:\Sitecore Training\viethoang.cd1.local” then the value is viethoang.cd1.local
- repeat #2 to add configuration parameter vhs.instance.name_CD2
- Name: vhs.instance.name_CD2
- Value: the name of CD2 website folder
- Ex: CD1 website root is “F:\Sitecore Training\viethoang.cd2.local” then the value is viethoang.cd2.local
- repeat #2 to add configuration parameter vhs.unicorn.sourceFolder
- Name: vhs.unicorn.sourceFolder
- Value: the full path of an available folder which will stores *.yml files
- Note: it should be short such as “D:\unicorn_files” in order to avoid “Windows File Paths Longer Than 255 Characters” issue in the very first run of Unicorn Sync
- finally we’ve just done for the configuration parameters
What’s next?
Run build Viet Hoang – Simple Development Framework :: CA – CD1 – CD2. Hopefully, you will have no any issues and when the build is done, you would see something like this:
How to verify the automating Sitecore deployments on your machine
- open a browser, navigate to http://viethoang.cm.local/sitecore/
- log into it by using (admin / b)
- do publish site
- open a browser, navigate to http://tekcent.local
- open a browser, navigate to http://demo.local
Hopefully, you would see something like this:
Got issues?
Please send your issues (with screenshots if possible) to viet.hoang.sitecore@gmail.com so that I have a chance to understand your problem and be able to suggest the solution.
Happy Sitecore coding!
2 thoughts on “Workshop – Playing Sitecore 9 auto-deploy with TeamCity on your machine (Part 2)”