20 October 2012

Monitoring Sitecore TDS Exclude Rules with MSBuild Task

MSBuild Task for monitoring the Exclude Rules in a Sitecore TDS Project file.

We use TDS Deployment straight to production and UAT, therefore we require build safety for validating that no content from the Content and Media Nodes is released to these environments.

Further details on our release model: OneClick-deployment-for-Sitecore

The custom task is added to any of your projects project files with the UsingTask. This could be the TDS Project file but it can also be your main web project file.

The parameters are the Sitecore Paths to monitor and the Exclude Rules to monitor for. By setting up a separate target you might also just want to trigger the validation for the builds on the target environments.

Errors will take down the build and make sure your team maintains the integrity of the environment.

The same "hard" validation should be set on server side, so that TDS can be configured to block the attempt of updating certain paths on a UAT or test environment. But currently TDS does not support this without considerable ninja moves. The suggestion has been sent to Hedgehog.

Source Code available on https://gist.github.com/3922384

No comments: