Continuous Integration & Development Strategy


by Patrick O. Ogbuitepu - 25th April 2024

How to Achieve CI & CD without Branching

Continuous Integration: save code into github branch after working
Dark Launch: do not integrate unfinished code with the process flow
Feature Flag: use a globally accessible variable (flag) to control release of new features


Justification for Continuous Integration

Continuous Integration Feature Branching
How it Works

Continuous Integration involves automating the process of integrating code changes from multiple contributors into a single software project.

It typically requires developers to save their work to a shared place (shared repository) several times a day to make sure everything works well together.

Feature branching involves creating a separate branch in the version control system for each new feature being developed.

This allows multiple features to be developed in parallel without interfering with the main codebase. Changes are merged back into the main branch once the feature is complete.

Merits
  • Errors and conflicts are detected early, making them easier and cheaper to resolve.

  • Regular testing ensures that defects are caught early, improving the overall quality of the software.

  • Increased Transparency

  • Reduced complexity of merging efforts by frequently merging everyone's code
  • Isolation: Developers can work on features without affecting the stability of the main codebase.

  • Encourages experimentation since changes can be abandoned or revised without impacting the main project.

  • Multiple features can be developed and tested simultaneously.
Demerits

Additional effort spent on regression tests before push (upload to the shared repository)

  • Merge Complexity: Integrating a long-running branch can result in difficult-to-resolve conflicts.

  • Delay in Integration: Bugs and integration issues might only become apparent when merging back to the main branch.

  • The main branch and feature branches can diverge significantly, leading to integration challenges.
Academic References
  • Fowler, M., & Foemmel, M. (2006). "Continuous Integration." ThoughtWorks.

  • Duvall, P. M., Matyas, S., & Glover, A. (2007). "Continuous Integration: Improving Software Quality and Reducing Risk." Addison-Wesley Professional.

  • Beck, K. (2000). Extreme programming explained: embrace change. Addison-Wesley Professional.

  • Kim, G., Humble, J., Debois, P., Willis, J., & Forsgren, N. (2021). The DevOps handbook: How to create world-class agility, reliability, & security in technology organizations. IT Revolution.
  • Bird, C., Nagappan, N., Murphy, B., Gall, H., & Devanbu, P. (2009). "Does distributed development affect software quality? An empirical case study of Windows Vista." In Proceedings of the 31st International Conference on Software Engineering.

  • Rigby, P. C., & Bird, C. (2013). "Convergent Contemporary Software Peer Review Practices." In Proceedings of the 2013 9th Joint Meeting on Foundations of Software Engineering.