build · deployment

Workshop – Automating Sitecore deployments with TeamCity at your machine (Part 2)

This post is 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

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.

  1. log into TeamCity
  2. create the configuration parameters:
    • Administration -> Projects -> Vh Local -> CA – CD1 – CD2
    • left navigation: select Parameters  -> Add new parameter
  3. add configuration parameter vh.AssemblyVersion
    • Name: vh.AssemblyVersion
    • Value: 1.1.0
  4. repeat #2 to add configuration parameter vh.buildConfiguration
    • Name: vh.buildConfiguration
    • Value: Release
  5. repeat #2 to add configuration parameter vh.defaultBranch
    • Name: vh.defaultBranch
    • Value: Release-1.5.3
  6. repeat #2 to add configuration parameter vh.deployIisAppPath_CA
    • Name: vh.deployIisAppPath_CA
    • Value: viethoang.ca.local
  7. repeat #2 to add configuration parameter vh.deployIisAppPath_CD1
    • Name: vh.deployIisAppPath_CD1
    • Value: viethoang.cd1.local
  8. repeat #2 to add configuration parameter vh.vh.deployIisAppPath_CD2
    • Name: vh.deployIisAppPath_CD2
    • Value: viethoang.cd2.local
  9. repeat #2 to add configuration parameter vh.deployPassword
    • Name: vh.deployPassword
    • Value:
  10. repeat #2 to add configuration parameter vh.deployPublishMethod
    • Name: vh.deployPublishMethod
    • Value: InProc
  11. repeat #2 to add configuration parameter vh.deployServiceUrl_CA
    • Name: vh.deployServiceUrl_CA
    • Value: http://viethoang.ca.local
  12. repeat #2 to add configuration parameter vh.deployServiceUrl_CD1
    • Name: vh.deployServiceUrl_CD1
    • Value: http://viethoang.cd1.local
  13. repeat #2 to add configuration parameter vh.deployServiceUrl_CD2
    • Name: vh.deployServiceUrl_CD2
    • Value: http://viethoang.cd2.local
  14. repeat #2 to add configuration parameter vh.deployUserName
    • Name: vh.deployUserName
    • Value:
  15. repeat #2 to add configuration parameter vh.errorOnFail
    • Name: vh.errorOnFail
    • Value: true
  16. repeat #2 to add configuration parameter vh.instanceRoot_CA
    • Name: vh.instanceRoot_CA
    • Value: the full path parent folder of CA website folder
      • Note: backslashes are escaped
      • Ex: “F:\\Sitecore Training\\viethoang.ca.local”
  17. repeat #2 to add configuration parameter vh.instanceRoot_CD1
    • Name: vh.instanceRoot_CD1
    • Value: the full path parent folder of CD1 website folder
      • Note: backslashes are escaped
      • Ex: “F:\\Sitecore Training\\viethoang.cd1.local”
  18. repeat #2 to add configuration parameter vh.instanceRoot_CD2
    • Name: vh.instanceRoot_CD2
    • Value: the full path parent folder of CD2 website folder
      • Note: backslashes are escaped
      • Ex: “F:\\Sitecore Training\\viethoang.cd2.local”
  19. repeat #2 to add configuration parameter vh.LastSuccessfulBuildDateTimeFilePath
    • Name: vh.LastSuccessfulBuildDateTimeFilePath
    • Value: .\LastSuccessfulBuildDateTime.txt
  20. repeat #2 to add configuration parameter vh.minDateTimeForCheckingProjectUpdate
    • Name: vh.minDateTimeForCheckingProjectUpdate
    • Value: 1/1/2016 1:32:56 PM
  21. repeat #2 to add configuration parameter vh.solutionFile
    • Name: vh.solutionFile
    • Value: VietHoang.Sitecore.sln
  22. repeat #2 to add configuration parameter vh.unicornFolder
    • Name: vh.unicornFolder
    • 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
  23. finally we’ve just done for the configuration parameters
    • asd_8

What’s next?

Just Run Build Vh Local :: CA – CD1 – CD2. Hopefully, you will have no any issues and when the build is done, you would see something like this:

asd_9.png

How to verify the automating Sitecore deployments at your machine

Open a browser, navigate to:

Hopefully, you would see something like this:

homepage

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!

Advertisement

One thought on “Workshop – Automating Sitecore deployments with TeamCity at your machine (Part 2)

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.