What is Continuous Integration?
Continuous integration (CI) is a development principle that requires the team to work in a version control software where they commit the code several times a day, and the CI tool automates the operations with the code every time the person makes changes. Such tools monitor changes, merges them, run builds and tests, perform analysis, etc. In case when build fails, it informs about it people who work on the project, usually the person who committed the last build.
How Continuous Integration Works
CI tools show the information about the current state of the sources in the system. If the last build failed, we can not take the latest version of source code, and the program shows who made a mistake, so this build could be fixed quickly. In this environment the highest priority task is to fix the build. The benefits are evident: the more often you build and test during development, the less you have to worry about the quality of the product. Continuous building and testing make the go-live date just another routine deployment.
There are CI practices to achieve the best result. They include:
Maintain the code repository because it helps you to stay consistent with the code, spot bugs quickly, and make code merges instantly.
Automate the build because it improves product quality, accelerates compile and link processing, eliminates redundant tasks.
Make the build self-testing because this is how you understand that every feature meets client expectations.
Every commit should build on an integration machine because it reduces the number of conflicting changes.
Keep the build fast because this helps to avoid the problems with integration.
Test in the production environment clone because the test environment may differ from the production one, and unpredicted issues may come up.
Make it easy for anyone to get the latest build because you will agree on the product functionalities with the team and the client the earliest possible to avoid re-work.
Automate deployment because then you ensure continuous deployment.
A big variety of CI tools are used to build, deploy, and automate the project delivery, for example, Jenkins, TeamCity, Bamboo, Codeship, CruiseControl, Gump, etc. The first two are worthy of a particular attention. Jenkins and TeamCity allow software engineers to integrate code branches during the development process and run series of automated tests against them. Though they have similar working principles, they have a lot of differences too, which will be more or less suitable for one or another environment.
Jenkins for Continuous Integration
This is an open-source Java-based CI server package, that manages and controls development lifecycle processes of all kinds, including build, document, test, package, stage, deployment, static analysis, and many more. It is easy to install and use. Jenkins fans claim that they love it for its integrations, community support, scalable model, variety of plugins. It is easy to use, and it never forgets testing. Among Jenkins users are Netflix, Dell, Tumblr.
If you are a big open source fan Jenkins CI is irreplaceable, as it is totally free, mature, and has a big community which is always there to help.
- Continuous Integration and Continuous Delivery;
- Easy installation;
- Easy basic configuration (which typically should be enough for most use cases);
TeamCity for Continuous Integration
There are a lot of good reasons to choose TeamCity. The product is very well documented, and there are a lot of examples and tutorials available. TeamCity is not open source, but still has a free option for small projects. It provides an excellent backup functionality and source control support. As well as Jenkins, it is easy to install and use. Twitter, eBay, and Wikipedia prove that TeamCity is a great software. It supports Java, .NET, and Ruby development and integrates perfectly with major IDEs, version control systems, and issue tracking systems.
- Technology Awareness;
- VCS Interoperability;
- Key Integrations;
- Build History;
- Extensibility and Customization;
- Cloud Integrations;
- Build Infrastructure;
- System Maintenance;
- Continuous Integration;
- Code Quality Tracking;
- User Management.
Choosing the best CI tool depends on your environment. Success is rarely determined by a tool. You should consider such points while choosing the tool for your project:
- Do you need an endlessly extensible open source solution that you’re willing to learn?
- Would you rather pay upfront for a commercial solution geared to increase usability?
Jenkins and TeamCity are both great continuous integration tools. They’ll help you to reduce risks, spot buds at the early stages of the development, automate processes, organize better collaboration in a team. But your choice depends only on your business needs and your preferences.