Continuous Integration (CI) is an Agile and DevOps best practice that allows multiple developers to contribute and collaborate on a common code base at high speed. Without continuous integration, developer collaboration becomes a tedious manual process of coordinating code updates and merges.
CI is based on software development guidelines with Agile and DevOps principles such as automated testing, version control, build automation, and automated deployment. Each of these basic components of continuous integration has its own ecosystem of tools and principles. Software development tool vendors have developed comprehensive “CI-as-a-Service” offerings that combine these components into a single package. To better understand these comprehensive offerings, let’s repeat the basics.
Source code version control
Perhaps the most important component of continuous integration is source code version management. It is used to identify and resolve editing conflicts between multiple developers sharing a common code base. Source code version control is supported by various tools. The best known of them are Git and Subversion. Version control system is at the heart of products that provide “CI as a service”.
Automated testing
Most serious software development projects include an auxiliary code base not directly related to the business product and its features. This auxiliary code base is a set of tests and acts as a set of confirmations to ensure that the main code base is working correctly and bug-free. Developers run these tests during development to ensure that new code does not degrade existing features. External tools can also be used to run test scripts to automate the approval process. Products that provide CI service automatically run project test scripts when user-defined events occur. Typically, when a developer submits code using a version control system, this event triggers the automatic execution of the full suite of tests.
Build Automation
“Builds” are artifacts that are created to provide a snapshot of the state of the current release version in a software development project. Assemblies are distributed to end users through various networks. Typically, to create an assembly artifact, a series of script steps must be performed in a project. CI tools help to optimize the build process by using automatic triggers in the version control system. An example of a trigger would be merging new code with a branch of the production environment in the code base, followed by uploading the build to a remote server for users to download.