###### tags: `DevOps`
# Continuous Integration
----
## Overview
* Continuous integration (CI) is a software development **practice** of **regularly integrating code changes** into the **main branch** of a repository and **testing** the changes several times a day.
---
## Essential Steps
- There are essential steps (i.e. must be included) in a CI cycle:
1. Code Quality and Analysis
2. Build
3. Artifact Meta
4. Artifacts
5. Test (Automatic)
---
## The Practices
* Maintain a single source repository
* Automate the build
* Make your build **self-testing**
* **Regularly commit new changes.**
* Every commit should build on an integration machine
* Keep the build fast
* Test in a clone of the production environment
* Make it easy for anyone to get the latest executable version
* Everyone can see what’s happening
---
## Case Study: Ideal Jenkins Pipeline Flow

> https://medium.com/@maxy_ermayank/pipeline-as-a-code-using-jenkins-2-aa872c6ecdce
## References
[1] https://www.thoughtworks.com/continuous-integration
[2] https://martinfowler.com/articles/continuousIntegration.html
[3] https://nevercode.io/blog/how-to-do-continuous-integration-right/
[4] https://medium.com/@maxy_ermayank/pipeline-as-a-code-using-jenkins-2-aa872c6ecdce
{"metaMigratedAt":"2023-06-15T00:12:20.729Z","metaMigratedFrom":"Content","title":"Continuous Integration","breaks":true,"contributors":"[{\"id\":\"76b470af-d941-496c-9f55-5841ff4dfd27\",\"add\":1643,\"del\":328}]"}