“Continuous Integration (CI)”is a software engineering practice in which developers are required to regularly (at least daily) merge their code changes into a central/shared repository. Each check-in is then verified by an automated build, allowing teams to detect problems early.
Grady Booch first named and proposed CI in his 1991 method, although he did not advocate integrating several times a day. Extreme programming (XP) adopted the concept of CI and did advocate integrating code more than once per day.
CI not only could be used in Agile or Extreme Programming but traditional development approaches, such as the Waterfall model can also get benefitted from using CI methods for the construction stage.
Continuous integration software tools can be used to automate the testing and build a document trail. CI keeps the entire development team in sync, removing the delays due to integration issues. When used properly, continuous integration provides various benefits, such as constant feedback on the status of the software, as code changes are immediately tested and reported on, when they are added to a larger code base. Continuous Integration also improves Software Quality and Reduces Risk.
Continuous integration entails both an automation component (e.g. a CI or build service) and a cultural component (e.g. learning to integrate frequently).
Typical CI-CD process (below get improved with DevOps implementation):
Issues with traditional Integration & Build Process:In the past, developers on a team might work in isolation for an extended period of time and only attempt to merge their changes to the master branch once their work was completed. This batched process made merging accumulated code changes difficult and time-consuming. This is compounded when small bugs accumulate for a long time without correction. These factors combined made it harder to deliver updates to customers quickly.
With continuous integration, developers frequently commit codes to a shared repository using a version control system such as Git. Prior to each commit, developers may choose to run local unit tests on their code as an extra verification layer before integrating. A continuous integration service detects commits to the shared repository, and automatically builds and runs unit tests on the new code changes to immediately surface any functional or integration errors. If necessary, partially completed features can be disabled before commit, such as by using feature toggles.Organisations using CI typically use a build server to implement continuous processes of applying quality control like in addition to running the unit and integration tests, such processes run additional static and dynamic tests, measure and profile performance, extract and format documentation from the source code and facilitate manual QA processes(if required).
Continuous Delivery expands upon Continuous Integration by deploying all code changes to a testing environment and/or a production environment after the build stage. With continuous delivery, code changes are automatically built, tested, and prepared for a release to production. DevOps play a very important role in achieving Continuous Integration (CI) and Continuous Delivery (CD).
Practices of Continuous Integration:
- Maintain a Single Source Repository.
- Automate the Build
- Make Your Build Self-Testing
- Everyone Commits To the Mainline Every Day
- Every Commit Should Build the Mainline on an Integration Machine
- Fix Broken Builds Immediately
- Keep the Build Fast
- Test in a Clone of the Production Environment
- Make it Easy for Anyone to Get the Latest Executable
- Everyone can see what’s happening
- Automate Deployment
For the success of CI setup it is very important that team understand and make the habit of frequently check-in code, and resolve any broken build ASAP.
Continuous Delivery (CD) is the ability to get changes into production, or into the hands of users, safely and quickly in a sustainable way. . Please have a look at my blog on “Continuous Delivery”.
@Mohammad Sami -Agile Transformation Coach
NOTE: Please note that due to some technical issues we have lost all the users comments until March 2019. We apologise for the same. Please feel free to comment and share your views.
4,055 total views, 5 views today