-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Continuous Integration (Prahlad Ranjit) (#289)
- Loading branch information
Showing
3 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 105 additions & 0 deletions
105
Topics/Software_Engineering/continuous_integration/Continuous_Integration.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# Continuous Integration (CI): A Comprehensive Overview | ||
|
||
## Table of Contents | ||
|
||
1. [Definition](#1-definition) | ||
2. [Key Principles](#2-key-principles) | ||
3. [Importance and Benefits](#3-importance-and-benefits) | ||
4. [CI Process](#4-ci-process) | ||
5. [CI Tools](#5-ci-tools) | ||
6. [Best Practices](#6-best-practices) | ||
7. [Continuous Delivery vs. Continuous Deployment](#7-continuous-delivery-vs-continuous-deployment) | ||
8. [Advantages and Disadvantages of CI over CD](#8-advantages-and-disadvantages-of-ci-over-cd) | ||
9. [Challenges](#9-challenges) | ||
|
||
## 1. Definition | ||
|
||
Continuous Integration (CI) is a software development practice in which team members regularly integrate their code changes into a shared central repository after which automated builds and tests are run. The primary goal is to detect and address integration issues early in the development process. | ||
|
||
 | ||
|
||
## 2. Key Principles | ||
|
||
- **Frequent Integration:** Developers integrate their code changes multiple times a day. | ||
- **Automated Builds:** The process of building the application is automated to ensure consistency. | ||
- **Automated Testing:** Automated tests are run to identify and fix bugs early in the development cycle. | ||
- **Version Control Integration:** CI is tightly integrated with version control systems (e.g., Git, SVN) to trigger builds on code changes. | ||
|
||
## 3. Importance and Benefits | ||
|
||
- **Early Bug Detection:** CI helps identify integration issues and bugs early in the development process, reducing the time and effort required for debugging. | ||
- **Improve Developer Productivity** Continuous integration helps your team be more productive by freeing developers from manual tasks and encouraging behaviors that help reduce the number of errors and bugs released to customers. | ||
- **Faster Feedback:** Developers receive prompt feedback on the impact of their changes, allowing for quick adjustments. | ||
- **Collaboration:** CI encourages collaboration among team members by providing a centralized and updated codebase. | ||
- **Consistency:** Automated builds ensure consistency across different environments, reducing "it works on my machine" issues. | ||
- **Deliver Updates Faster** Continuous integration helps your team deliver updates to their customers faster and more frequently. | ||
|
||
## 4. CI Process | ||
|
||
- **Code Commit:** Developers commit their changes to the version control system. | ||
- **Automated Build:** A CI server (e.g., Jenkins, Travis CI) monitors the version control system. Upon detecting changes, it triggers an automated build process. | ||
- **Automated Tests:** The built application undergoes a series of automated tests, including unit tests, integration tests, and potentially other types of tests. | ||
- **Artifact Generation:** If all tests pass, the CI server generates deployable artifacts, such as executable files or libraries. | ||
|
||
## 5. CI Tools | ||
|
||
- **Jenkins:** An open-source automation server that supports building, testing, and deploying code. [Learn More](https://www.jenkins.io/) | ||
- **AWS CodePipeline** One of the most dominant cloud infrastructure providers in the market. [Learn More](https://aws.amazon.com/codepipeline/) | ||
- **Travis CI:** A cloud-based CI service that integrates with GitHub repositories. [Learn More](https://docs.travis-ci.com/) | ||
- **GitLab CI/CD:** Integrated CI/CD capabilities within the GitLab platform. [Learn More](https://docs.gitlab.com/ee/ci/) | ||
- **GitHub Actions:** GitHub's built-in CI/CD and automation tool. [Learn More](https://docs.github.com/en/actions) | ||
|
||
## 6. Best Practices | ||
|
||
- **Fast Builds:** Keep build times short to provide rapid feedback. | ||
- **Comprehensive Testing:** Include a variety of tests to ensure code quality. | ||
- **Version Control Integration:** CI should trigger on every code commit to the version control system. | ||
- **Isolation:** Tests should be run in isolated environments to prevent interference between different builds. | ||
|
||
## 7. Continuous Delivery vs. Continuous Deployment | ||
|
||
- **Continuous Delivery (CD):** The process of automatically deploying successful builds to staging or testing environments. | ||
- **Continuous Deployment (CD):** Automatically deploying successful builds to production, eliminating manual intervention. | ||
|
||
## 8. Advantages and Disadvantages of CI over CD | ||
|
||
### Advantages of Continuous Integration (CI) | ||
|
||
#### 1. Early Issue Detection | ||
|
||
- **Advantage:** CI allows early detection of integration issues and bugs, reducing the time and effort required for debugging. | ||
- **Example:** Automated tests identify issues as soon as code changes are integrated. | ||
|
||
#### 2. Controlled Deployment | ||
|
||
- **Advantage:** CI provides control over when and how changes are deployed to different environments. | ||
- **Example:** Successful builds are ready for deployment but require manual intervention. | ||
|
||
#### 3. Collaboration | ||
|
||
- **Advantage:** CI encourages collaboration among team members by providing a centralized and updated codebase. | ||
- **Example:** Developers regularly integrate their code changes into the shared repository. | ||
|
||
### Disadvantages of Continuous Integration (CI) compared to Continuous Deployment (CD) | ||
|
||
#### 1. Delayed Deployment | ||
|
||
- **Disadvantage:** CI does not automatically deploy changes to production, leading to potential delays. | ||
- **Example:** Deployment to production requires additional manual steps. | ||
|
||
#### 2. Limited Automation | ||
|
||
- **Disadvantage:** CI may involve manual steps in the deployment process, limiting automation. | ||
- **Example:** Certain deployment tasks require human intervention. | ||
|
||
## 9. Challenges | ||
|
||
- **Complex Integrations:** Large and complex projects may face challenges in integrating changes smoothly. | ||
- **Testing Speed:** As the codebase grows, the time taken for automated tests may increase. | ||
|
||
### Further Resources | ||
|
||
- [Jenkins Documentation](https://www.jenkins.io/doc/) | ||
- [Travis CI Documentation](https://docs.travis-ci.com/) | ||
- [GitLab CI/CD Documentation](https://docs.gitlab.com/ee/ci/) | ||
- [GitHub Actions Documentation](https://docs.github.com/en/actions) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.