10. Continuous Integration Flashcards
problems/ risks in integration
- spend more time integrating than creating new features
- problems occur as software evolves due to concurrent development
- problems worsen when develop tries to:
- integrate large change to code base
- infrequent new feature integration
However, continuous integration is not without its risks and challenges:
Continuous integration tools have to be introduced and maintained
The continuous integration process must be defined and established
Test automation requires additional resources and can be complex to establish
Thorough test coverage is essential to achieve automated testing advantages
Teams sometimes over-rely on unit tests and perform too little system and acceptance testing
Continuous integration requires the use of tools, including tools for testing, tools for automating the
build process, and tools for version control.
continuous-integration practices
- change management
- maintain single source repository
- everyone commit to main line everyday
- every commit builds mainline
- everyone can see what is happening - quality assurance
- automate the build
- make build self testing
- test in a clone of the repository
- keep the build fast - deployment
- make it easy for anyone to get latest executable
- automate deployment
late integration
- working on separate copy of source code for implementation
- considerable amount of conflict for merging
what is continuous integration
- split work into small changes
- integrate frequently
- limit effect of exponential rate of divergence of the trunk
feature branching option
- implement new feature on trunk with frequent small commit
- implement new feature on branch and merge frequently
- implement feature as a prototype branch, then re-implement feature on the trunk in small changes
- implement features as permanent branch
maintain multiple continuous integration processes
- main line trunk development
- forked development for specified customer/purpose
- latest stable release only receive defect fixes
- significant feature branch
monitoring and maintaining software quality
- detecting broken builds
- system should be compiled from source in clone repository
- automated regression test executed on complete system
- static analysis checks performed to compare with benchmarks
preventing broken public builds (trunk)
flow…
preventing broken public builds (branches)
flow…
staging environment
- environment configured to replicate conditions that software will be used in
- configured with current hardware software dependencies
- changes need to be checked before release
- more than 1 staging environment may be needed.
limitation of staging environment
- system distributed on too many computing nodes to test realistic scenarios
- system has too many simultaneous users
- too many diverse user types
- only one platform for software is available
- software dependencies cannot be accessed outside of production
monitoring and visibility
push notifications and broadcast mechanism
monitoring metrics
- unsuccessful builds
- average unsuccessful test
- time to build
why are fast build essential
- delays in completing also delays discovery of problems
- developers deterred from making frequent commits as waiting for build to complete reduce productivity
continuous deployment
- automate deploying of software
- advantages:
- ensures that deployment process is used regularly
- different features can be deployed to differentiate users