Automate Everything

What are Post Deploy Steps?

Want to add your own post deploy functionality to a Sitecore deployment or Sitecore update package? There’s a feature for that!

Post deployment steps in Team Development for Sitecore was built to easily allow developers to add their own functionality to the Sitecore deployment process. Adding custom post deploy steps was a hugely requested feature, and it's easy to see why. Adding post deploy steps to your Sitecore deployment architecture can perform a number of useful functions, like triggering a save event for every deployed item or having deployed items published automatically.   

How to Set Up Post Deploy Steps

Writing these steps requires you to understand how to write MSBuild scripts. Fortunately, there are many resources available on the web. The MSBuild Reference is a good place to start. If you want to quickly review the built-in MSBuild tasks, please see the MSBuild Task Reference.

Once you have a firm grasp of MS Build scripts comes the real tricky part, applying it to life. During the course of your day think of all the little parts of your solution that would be nice to automate or cool actions that would be nice too. Once you think up a few, it's downhill from there!

To create a Custom Step, you first need to create a post deployment class, the class needs to inherit from the IPostDeployAction interface. This interface is located in the TDS Assembly. After creating the post deployment class, add it to the project so it can be included in the build (either by including the class in another assembly that is being deployed, or ensuring that the assembly is copied to the /bin folder of the Source Web Project referenced in the TDS General property page). Finally, once the fully qualified class has been added to the .scproj file, the developer can manipulate the class in the deploy property page.

Get Involved!
There is no better place for community support than to create productivity scripts others can use! Share your scripts with us and we'll add them to our repository for all to use. Post a blog, with your scripts, including the 5 easy steps below and we will post your script!
  • Describe The Problem
    • Tell us about the problem you are trying to solve.
  • Document Your Solution
    • How does your script solve the problem you've established?
  • Installation and Use your Script
    • Walk us through your installation and use of the script.
  • Show it off!
    • Screenshot or log snippets of your script in action.
  • Link it to us
Check some out
Rebuild Content Search Indexes

@seanholmesby created a custom script to rebuild the Content Search Indexes after deployment


@jammykam created a custom script to run post-deploy actions and add additional post deploy steps whenever needed using PowerShell scripts.  

Configuring Sitecore Role Members

@ram282 created a custom script that reads all the installed Roles from the TDS project and uses the configured role mappings in json to add role members using Sitecore Security APIs.

The File Remover

@AgileStCyr created a custom script that removes files; give it a pipe-delimited list of relative paths that are in the web root that you want gone and it will look for them and clean them out!

Slack Notifications

@dthunziker created a custom script that takes the mystery out of Update Package installations by notifying a Slack channel after the installation completes.  

Rebuild your link database

@seanholmesby created a script that progmatically rebuilds your link database upon a successful deployment. 

Trigger a Site Publish

@ezlateva create a custom script to automatically trigger a site publish after a successful deployment

Publish Items via Publishing Queue

@jraps20 created a script that populates the Publishing Queue with installed items & executes a single publish operation.