One of my presentations in DevOps training session at Higgsup. This presentation is an introduction to Continuous Integration and best practices to apply Continuous Integration to your project.
Topics covered in this session are:
1. Prerequisites for Continuous Integration
2. Problems with traditional software integration
3. What is Continuous Integration?
4. Why Continuous Integration?
5. How does Continuous Integration works?
6. Best practices of Continuous Integration
7. Summary
2. Contents
1. Prerequisites
2. Problems
3. What is Continuous Integration?
4. Why Continuous Integration?
5. How does Continuous Integration works?
6. Best practices of Continuous Integration
7. Summary
4. Version Control System (VCS)
● A system that records changes to a file or set of files over time.
● Every file
○ Has a full history of changes: records of Who did What, When, Why
○ Can be restored to any version at any time
● Benefits
○ Allows a team to manage/share source code
○ Keeps track of all versions of files
○ Possibility to recall specific versions of files
○ Allows simultaneous development of different features on the same codebase
6. Distributed Version Control System
Terminologies:
● Repository
● Clone
● Commit
● Pull/Push
● Branch
● Merge (Integrate)
7. Automation Testing
● The use of special software/tools to:
○ Control the execution of tests
○ Assert actual outcomes with expected outcomes
● Critical for CI/CD.
8. Software Build
What is software build?
● The process by which source code is converted in to a standalone software
artifact that can be run on a server
Build tools
● The process of building software is usually managed by a build tool
● Examples: Ant, Maven, Gradle,…
9. Software Deployment
● All of the activities that make a software available to use.
● Including installation, configuration, running, testing, and making necessary
changes,…
16. Why Continuous Integration?
Building Software can be a risky business
● Fixing bugs late is costly
● Lack of team cohesion
● Lack of project visibility
● Poor quality code base
● Lack of deployable software
18. Risk 02: Lack of team cohesion
● “Your changes to UserService conflicts with mine. How do we merge now?”
● “When did you change the Account API? I’m still using the old version in my
branch? How can I merge now?”
● “When did we decided to upgrade to version 2.0-alpha of iTextPDF?”
● ….
19. Risk 03: Lack of project visibility
● “What do you mean by the latest build was fail and the master branch was
broken?”
● “What do you mean the tests are failing?”
● “What’s in version 1.2.3 of the build?”
● “What’s our code coverage now? “
20. Risk 04: Poor quality code base
● “We have 3 classes doing the same thing???”
● “We have a function with thousand lines of code???”
● Coding standard violations
● Duplicated code!
● ….
21. Risk 05: Lack of deployable software
● “It works on my machine!”
● “I need a new build to test with” (QA)
● “The [boss|client|customer] is coming, we need to demo progress asap”