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.
- Installing node module.
- Copying Sitcore Libraries.
- Nuget Restore
- Build Project
3.Creating next 3 build configurations.
- Publish All Project
- Apply XML Transform
- 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:-
1. Create service account by user account.
2. Creating Data Directory for teamcity.
3. Choosing the database for teamcity. I will be setting upwith Internal(HSQLDB).
You can also choose MS SQL Server and provide the connection details.
4. Creating administrator login account.
5. First setup will be creating the project for your solution.
6. As we are using Bitbucket for code repository. So we will be connecting to Bitbucket.
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.
Goto OAuth and add consumer.
8. Enter Name and description for your project. Copy URL and Callback URL from teamcity wizard and paste here.
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.
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.