What is CI/CD
CI/CD is a methodology for continuous software development that minimizes the chance of introducing errors during the software development process through automation scripts. It reduces — or even eliminates — manual intervention from the development of a new feature all the way through its deployment to production.
CI/CD encompasses three concepts: Continuous Integration, Continuous Delivery, and Continuous Deployment.
Continuous Integration
Continuous Integration refers to the practice of automatically triggering builds and tests whenever code is pushed to a repository, reducing the likelihood of introducing errors. CI does not eliminate bugs, but it makes them much easier to find and fix.
Continuous Integration primarily runs fast checks such as builds, unit tests, and code style linting.
CI runs on both feature branches and the master branch. Typically, code on a feature branch must pass CI before it can be merged into master.
Continuous Delivery
Continuous Delivery is an extension of Continuous Integration that ensures new changes can be released to production in a sustainable and rapid manner. The primary goal of Continuous Delivery is to keep the application in a deployable state so it can be released to production at any time.
Compared to CI, Continuous Delivery adds acceptance tests and automated deployments to a staging environment. Some manual verification may be performed in the staging environment before the changes are promoted to production.
Continuous Delivery primarily runs on the master branch, though acceptance tests may sometimes also run on feature branches.
Continuous Deployment
Continuous Deployment builds on Continuous Integration and takes Continuous Delivery one step further. Every change that lands on the mainline is automatically deployed to production.
Compared to Continuous Delivery, Continuous Deployment requires a more comprehensive test suite.

Image source: www.atlassian.com
Benefits of CI/CD
Below are some of the benefits that come with adopting CI/CD.
Frequent deployments: CI/CD accelerates the build and deployment process, enabling multiple deployments per day.
Reduced risk: By continuously releasing the smallest possible increments, the risk of production bugs is lowered. It also makes releases less painful for QA teams and customers.
Lower costs: Adopting CI/CD means investing in broader unit test coverage and more thorough acceptance tests, which may seem like additional work. In practice, the opposite is true — without solid unit tests and acceptance tests, teams end up spending large amounts of time on manual testing and risk breaking existing functionality. When bugs do occur (and they always will), the absence of tests means potentially spending a great deal of time tracking down and fixing issues.
Higher quality: A reliable set of automated tests enables bugs to be caught and fixed quickly.
Better team collaboration: A comprehensive test suite helps ensure that our changes have not broken any existing functionality.