Building Success with CI
Continuous Integration (CI) is one of the best methods for promoting increased productivity and higher software quality while effectively supporting Agile practices. Development teams that are good at CI have a high confidence level in their software that resides in source control. And through automated testing and associated metrics, they have a good understanding as to the quality of that code.
What is Continuous Integration?
CI is a software development best practice that was adopted as part of eXtreme Programming (XP) to help ensure the integrity of software under development. It requires developers to integrate code several times throughout each day by checking code into their source control repository. Each time this happens, that code is automatically compiled and built to ensure proper code syntax and to ensure the components are successfully assembled and packaged into a versioned software build. Automated tests are also often run to validate code quality and functionality. These tests usually include unit tests, but can also include functional and regression tests. CI is often used in conjunction with Test Driven Development (TDD) to ensure high quality of the software being developed.
CI can serve as a gatekeeper to the source control repository by rolling back any changes that breaks the build or fails any of the automated tests. Notifications can then be sent out to the developer who checked-in the code or to anyone else. This helps to maintain a specific level of quality for all code in the source control repository and facilitates collaboration among team members.
Benefits of Continuous Integration
CI provides numerous advantages for developers, teams, stakeholders and beyond. The value is realized through higher quality, reduced time to market, and greater predictability; all of which translates to happier customers, happier employees, and higher profits. Based on your practices and how your environment is configured, CI services can range from automatically creating software builds to safeguarding the source control repository through various quality gates. And it all comes down to automation. The more you take out of the hands of your people, the more productive your team(s) tends to be.
Confidence in Your Code
By gatekeeping your source control repository, you can be confident that all of your code compiles, builds, and successfully passes all automated tests.
Gone are the days spending hours or days, resolving dependencies, trying to integrate your software. By integrating and building on every check-in, you will know immediately if there is a problem integrating any of your software components.
Automate deployments as part of your CI process to automatically deploy to QA or UAT environments. This will ensure that QAs and other stakeholders always have the latest builds.
Integrating, building, testing, and deploying often is one of the best ways to mitigate risks associated with software development. The sooner you identify defects and issues, the sooner (and cheaper) you can fix them. And they will usually be small and relatively easy to fix.
Works on My Machine
Anyone who has done any significant development work outside of a mainframe environment has, at some point, declared “but it works on my machine.” While one developer may implement some changes, validate the changes locally (on his/her machine), and check the code into source control, another developer may pull down those changes and discover it either breaks their build or does not function as expected. CI resolves this problem as it automatically compiles, builds, and validates the changes that were checked in and rolls back those changes when they break the build or simply don’t work.
Facilitation of Agile Practices
CI facilitates Agile development by helping to roll out small, incremental changes often. By continuously integrating small pieces of functionality, testing early and often, and automatically deploying those new features to QA or UAT environments, the stakeholders have many opportunities, to not only see the new features, but to get their hands on them and provide feedback early and often. This visibility into an evolving product is a core value in Agile development.
Building a mature software development team requires continuous integration. Developing software without it only helps to increase risk, extend development time, reduce software and code quality, extend the feedback loop for stakeholders, and causes junior developers to go broke as they contribute a dollar each time they break the build. Few practices offer as many advantages as CI. For a relatively low cost, there is much to be gained.