Continuous Integration using TeamCity for Sitecore Helix Part-1

Posted by

Sitecore Helix Continuous Integration(CI) is the practice of having all developers in the team integrate their work with the
work of others. You would want to do this process frequently and automatically leveraging a build
server. By using continuous integration you can expect to reduce the number of issues that arise and
hence be more efficient.

There are many tools which provide CI like TDS, TeamCity etc.

TeamCity is one of the good tool for setting up CI. It is free till 20 build configurations settings. In our case, we will be needing 7 build configurations (minimum) which makes it one of the good options to consider. We will see those 7 build configurations in details in  upcoming blogs.

As TeamCity setup includes number of steps. So I have divided the complete process into 4 Parts:-

1. Installing Teamcity and Connecting to BitBucket.

2. Setting up project and creating first 4 build configurations.

      1. Installing node module.
      2. Copying Sitcore Libraries.
      3. Nuget Restore
      4. Build Project

3.Creating next 3 build configurations.

      1. Publish All Project
      2. Apply XML Transform
      3. Unicorn Sync

4.Trouble shooting errors

So let’s start with Part-1:- Installing TeamCity and Connecting to BitBucket account.

Download Teamcity and install.

Once the setup is complete you will get the complete wizard with setup details:-

teamcity-1

 

1. Create service account by user account.

teamcity2

2. Creating Data Directory for teamcity.

teamcity3

3. Choosing the database for teamcity. I will be setting upwith Internal(HSQLDB).


teamcity4

You can also choose MS SQL Server and provide the connection details.


4. Creating administrator login account.

teamcity5

5. First setup will be creating the project for your solution.

teamcity6

6. As we are using Bitbucket for code repository. So we will be connecting to Bitbucket.

 

teamcity7

teamcity8

7. Bitbucket connection require key and secret. So let’s go to bitbucket and create key and secret.

Login into bitbucket and goto bitbucket settings.


teamcity9

Goto OAuth and add consumer.
teamcity10

 

 

8. Enter Name and description for your project. Copy URL and Callback URL from teamcity wizard and paste here.

teamcity11

Once save we will receive the Key and Secret.

Copy Key and Secret and paste into teamcity and save.

9. Click on sign in Bitbucket and Grant permission.

10. Once permission is granted. You will be able to see all your repositories.

teamcity12

11. Click on your repository and provide username and password for the same.

So Teamcity setup is complete.

 

Now we can start creating build configurations.

One comment

Leave a Reply