If you haven’t used it already, one of the biggest features introduced in Kentico 9 was Continuous Integration.
To learn more about this feature, I would recommend reading the Kentico documentation and watching the following videos
Kentico 9 Continuous Integration is not to be confused with your deployment processes you may have that involve Continuous Integration / Continuous Deployments. It is basically a great introduction path towards making every database object in Kentico represented in the file system. The way Kentico does this for their Continuous Integration, is by serializing all the Kentico objects into XML files.
Here are the list of Kentico objects that are covered by Kentico in this version – Continuous Integration objects allowed
How to set it up?
So this awesome feature does not take long to set up. All you need to do is go to the Continuous Integration Module in Kentico and tick the box to turn it on.
The next thing to do is to Serialize all objects.
Once this is all setup, you then need to have a development team. So in our case we had a team of 3 people and Kentico Continuous Integration allowed us to all have local databases, we all started with the same local database.
We used a GIT repository and Source Tree to manage the transactions between our sharing of files between us.
To go along with this, we always ran the ‘Restoring continuous integration files to the database’ ContinuousIntegration.exe -r command after each successful code pull request.
With this all nicely set up, I wanted to share with you some specific areas that didn’t work so well for us and were missing in this version of Kentico 9 Continuous Integration.
First thing to remember, is to the check the Kentico Documentation on which objects are allowed and which are not. This is an essential part of understanding what Kentico have applied to which objects.
10 things to be aware of when using Kentico 9 Continuous Integration
1 - User not found?
We are all using local databases, I created myself a new user within the Admin area to make some changes. Once I made the changes, for example creating a new page in the tree, I wanted to share this change with my colleagues, so I committed those changes and pushed them.
My colleagues pulled those changes in using Source Tree and then ran the Continuous Integration command. This is where the first failure came to us. The reason for the failure was to do with a new user added on my machine, which was not present on their machines.
So with this the changes you have made get assigned to an user and if they don’t exist, you can’t perform those changes on the other machines.
To resolve this, we created the same individual users on the different machines.
2 - Have you cleared your cache mate?
I created a few new Page Templates and pushed this for my colleagues. They perform the pull request and even the Continuous Integration command runs successfully. However, they still can’t see the changes.
It is highly recommended to clear your Kentico cache.
3 - Localisation text is working for me!
When creating multi culture sites or just making content managed strings, it is advisable to use the Kentico Localisation Module and create Resource Strings where applicable.
Kentico Continuous Integration doesn’t push this as a change, as per the documentation, so there are a few options to make sure your team members are in sync…
- Add them in manually between the different team members.
- Export the Resource Strings out once your done and then import them into the individual team member Kentico sites.
4 - Have you updated your settings?
During your development, if you make a Kentico Settings adjustment, by default Kentico doesn’t allow them to be a part of the Continuous Integration, therefore you would need to turn this on. So if you want Settings, then it is recommended to amend the CIRepository config file to allow this Object typeinto the allowed list and then you would need to reserialize the objects.
To read more about this, I would heavily recommend reading the blog post by Kentico MVP, Jeroen Furst.
5 - Isn't the search working for you? It’s working for me!
Smart Search indexes have always been in the file system, but creating the initial Search within Kentico is something that is missing when using Kentico Continuous Integration. So there are a few options to make sure your team members are in sync…
- Add them in manually between the different team members.
- Export the Smart Search and then import it into the individual team member Kentico sites.
6 - Edit profile with custom fields not showing up on my version
This is another area, where Kentico 9 Continuous Integration is lacking when it comes to sharing this content between the different team members. To be fair, the System Fields for the User tables are always going to be tricky to move across.
So for this, we felt, as you can’t export the module, it was probably something we did manually, to make sure we were all in sync. For any future changes we just worked through it together.
7 - Not an ‘early bird’ Committer!
Something to be aware of in this version of Kentico Continuous Integration, is that when you make a few changes you will notice the number of amended files grow and grow.
To keep this amended list manageable, it is recommended to commit as often as reasonably possible, making sure you push your changes often for your team members to receive your changes.
8 - Get it on your websites now!
If you haven’t used this before, then what are you waiting for?
Seriously I would recommend it highly, as it would increase development speeds and it is a far better approach compared to dealing with shared databases and the potential bad connection issues.
9 - It’s missing something, who can I tell?
Well this is the beauty of Kentico, who would love to hear any feedback from you regarding this feature.
So do please let them know if something is missing or you experience some unexpected behavior.
10 - With great communication, comes great Kentico Continuous Integration...
It doesn’t matter if your in a small team or large team, communication is essential when working on changes and new features during any Kentico site build. Especially when you are dealing with some changes coming through and some not. We use a Slack channel for this and it works really well for us and it is a must when using Kentico 9 Continuous Integration.
There you have it, that was my top 10 things to be aware of when using Kentico 9 Continuous Integration. You shouldn’t quote me on this, but I have spoken to Kentico and all of these issues identified above and more have been resolved for the next Kentico version, which will be version 10 released in November. I can’t wait to use that version and this awesome feature with the updates!