3. What's Continuous Integration?
Continuous integration (CI) is a practice of integrating
code from multiple developers into a central repository
(or branch), multiple times per day
A CI build consists of automated processes that:
• Run automatic code quality scan, and generate a
report how well latest code changes adhere to good
coding practices
• Build code and run any automated tests (mostly unit
tests) that are written to make sure the changes don't
break any functionality
• Generate and publish a test coverage report
4.
5. What's CD?
• There're two meaning of CD. It stands for Continuous Delivery, and Continuous
Deployment as well
• What's Continuous Delivery?
• Continuous delivery is an extension of continuous integration where code changes
are automatically prepared for a release to production.
• It expands CI upon deploying code changes to testing environment and running
functional test, UI test, performance test, security test and so on after build stage
6. What's Continuous Deployment?
• Continuous deployment goes one step further than
continuous delivery.
• Every change that passed all stages of production pipeline is
released to customers without any human intervention
• Only a failed step can prevent a new change to be deployed
to production
8. Benefits
Companies need to build an effective pipeline to automate their build, integration and testing
processes.
It helps automate the testing process:
- Merge readiness
- Code review
- Unit testing
- Integration testing
- UI testing
- Performance testing
- Security testing
9.
10. CI Tools - Drone
• Why not Jenkins ; It has Complicated project setting, Write the plugin (Java language),
Maintenance?, Learning Curve.
• Why not GitLab ; Not extensible
Why Drone :
• Easy to install & maintain
• Isolate builds
• Simple YAML Configuration
• Integrates with several VCS Providers
• Rich set of official plugins (any container can be a plugin)
• Execute locally with simple command (drone exec)
• open source (https://github.com/drone/drone)
11.
12.
13. Best Practices
• Automated everything: build, test, deploy, monitor
• Keep everything in source control system (Git, SVN, etc...)
• Commit your code changes to repository frequently
• Do not commit directly to delivery branch, use feature branches and
• MR/PR workflow
• Do not merge broken code into delivery branch
• Every commit should be built
• Build only once and promote results through pipeline
• Do not use dynamic version for dependencies (e.g. latest,production)