build · deployment · framework

My simple Sitecore development framework version 1.9 and auto-deploy with TeamCity

Sitecore 8.2 Update 7 has just been out with Data Protection Considerations. Personally, I wanted to release a new version of my simple framework along with some updates:

  • Upgrading Sitecore References via Nuget from Sitecore 8.2.6 to Sitecore 8.2.7 ones
  • Refining the Sitecore template structure (there are some places violate Helix principles)
  • Updating gulp files to support auto-deploy with TeamCity

As a consequence, version 1.9 is out.

Auto-deploy with TeamCity

Setup Prerequisites

How to set it up

  1. use SIM to setup 03 new Sitecore 8.2 Update 7 instances:
    • 01 sitecore instance whose host name should be viethoang.cm.local
    • 01 sitecore instance whose host name should be viethoang.cd1.local
      • bind another host name hoavi.local
    • 01 sitecore instance whose host name should be viethoang.cd2.local
      • bind another host name demo.local
  2. copy-paste \App_Config\ConnectionStrings.config of cm to overwrite the one of cd1 & cd2 to ensure 03 Sitecore instances using the same databases
  3. install Node.js
  4. install TeamCity
  5. install Nuget.exe tool (latest version) in TeamCity
    • Administration -> Tools -> Install Tool…
    • asd_10
  6. install Gulp build runner to run gulp scripts in TeamCity
    • Administration -> Plugins List -> Upload plugin zip
    • asd_1
    • restart TeamCity Server after installing
    • sfv19_1
  7. import TeamCity_VhLocal.zip to TeamCity
    • Administration -> Projects Import -> Upload Archive then click  Configure Import Scope button
    • asd_3
    • check Viet Hoang – Simple Development Framework checkbox and then click Start Import button
    • adsc9_2
  8. go to Administration -> <Root Project> -> Viet Hoang – Simple Development Framework -> CM – CD1 – CD2 -> Parameters in order to correct 07 Configuration Parameters because they might be different between my machine and your machine
    • sfv19_2.png
      1. vhs.deployIisAppPath_CD1: the CD1 website name in IIS
        • adsc9_4
      2. vhs.deployIisAppPath_CD2: the CD2 website name in IIS
        • adsc9_5
      3. vhs.deployIisAppPath_CM: the CM website name in IIS
        • adsc9_6
      4. vhs.instance.Root_CD1: the full path parent folder of CD1 website folder
      5. vhs.instance.Root_CD2: the full path parent folder of CD2 website folder
      6. vhs.instance.Root_CM: the full path parent folder of CM website folder
      7. vhs.unicorn.sourceFolder: the full path of an available folder which will stores *.yml files (Note: it should be short such as “C:\unicorn_files” in order to avoid “Windows File Paths Longer Than 255 Characters” issue in the very first run of Unicorn Sync)

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:

adsc9_7

 

How to verify the automating Sitecore deployments at your machine

Hopefully, you would see something like this:

 

 

This slideshow requires JavaScript.

Note: you can play with Web Deploy (should ensure to enable its all features)

adsc9_10

as well by updating parameter vhs.forceToPublishWithMsBuild to false

  • go to Administration -> <Root Project> -> Viet Hoang – Simple Development Framework -> CM – CD1 – CD2 -> Parameters
  • adsc9_9

Additional one

Happy Sitecore Coding!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

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

Google+ photo

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

Twitter picture

You are commenting using your Twitter 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.