Razl – Keep Your Sitecore Synchronized

Let’s talk about Sitecore synchronization.

Sometimes a new feature needs to be tested with a set of real data. For example: Content Management(CM) data a UAT server.

There are common approaches like restoring DBs, creating packages, serializing items, etc. However, there are tools specifically designed for this task.

Continue reading

Posted in build, PowerShell, Razl, Sitecore | Tagged , | Leave a comment

How to avoid NullReferenceExceptions while working with Sitecore

Today we’ll talk about our favorite exception in C# 🙂

The purpose of this article is to help rid the codebase of nulls and create somewhat of a “null-safe” domain where everything can operate smoothly without nulls creating object property access issues (e.g. item.Parent.Language.Name)

I work with Sitecore, so all of the following examples will use Sitecore objects. But this approach could be applied to all “nullable” objects (which are all reference types in C#).
Continue reading

Posted in C#, Sitecore | Tagged , | Leave a comment

GIT repository cleanup

The project has been moved from the TFS & TFVC to the VSO & GIT and I was surprised by the size of one of my GIT repositories – it was 13GB!

This is quite large for a GIT repo and was caused by two things – the long project history and the large files contained in that history.

Keeping a GIT repository as small as possible is a good practice, so let’s do some cleanup.
Continue reading

Posted in BFG, cleanup, GIT, GIT-TF, TFS | Tagged , , , , | 1 Comment

MS SQL databases restore with TFS Team Build and PowerShell

Currently I’m working on a web project with a few environments like Dev, POC, QA, UAT, Staging, etc. Once per sprint we have to synchronize our DBs from Staging to other servers to make sure all environments are on the same page.

To achieve this, a new build definition was created in TFS which is similar to the one described in my “Run Batch File From TFS” post. All that build does is invoke a PowerShell script.

Continue reading

Posted in PowerShell, TFS | Tagged , | Leave a comment

Run batch file from TFS build?

From time to time, I have to run batch files to perform some cleanup or restore jobs on CI servers.

Usually this is as simple as logging into the remote server and manually launching a batch file. But what about automating this process a little bit and using TFS to launch scripts?

Currently I use TFS 2010, but this approach will also work with the 2012 and 2013 versions of TFS.

In order to do this, a new build definition must be created along with a template that has a few activities. After this, the batch file will be able to run on the build server using the TFS setup. The results will then be seen in the Build Details window.

bat

Build Template Creation
To get an empty template, I’ve taken DefaultTemplate.xaml (the default template in the TFS build system) and deleted all default activities using a graphic designer.
Continue reading

Posted in build, TFS | Tagged , , | 1 Comment