Core practices of DevOps — CI/CD

22Baron
3 min readJun 12, 2022

--

Amazon says → DevOps is the combination of cultural philosophies, practices, and tools that increases an organization’s ability to deliver applications and services at high velocity: evolving and improving products at a faster pace than organizations using traditional software development and infrastructure management processes.

This speed enables organizations to better serve their customers and compete more effectively in the market.

What is CI/CD? What is it to a DevOps engineer?

Continuous Integration (CI) and Continuous Delivery/Deployment (CD) are at the heart of DevOps. Continuous Integration is the automated build and testing process. Continuous Delivery/Deployment is the automated release and deployment process. These are the two circles of infinity.

CI/CD pipeline is the heart of DevOps

Please give a follow and subscribe if you are interested in such posts! Let us get back to the story.

Continuous Integration (CI):

Continuous integration means that as soon as the developer commits the code into a code management system like GitHub or bitbucket, the CI system will look into the code management system and pull in the change, compile it and prepare a build. This process is called continuous integration and the system/tool is called the continuous integration server like Jenkins.

It will automatically :

  1. pull in the changed code
  2. create builds for the codebase
  3. run test cases already defined
    — Unit testing and integration testing are also done automatically\
  4. Notify the developer in case of any error

Advantages of CI

  1. This helps developers to focus on just developing, only productive work. The automatic CI pipeline takes care of the rest
  2. Testing with each code change or commit helps to find and resolve bugs and issues early on with very little financial impact
  3. It will help you deliver the product or its updates to your customers ASAP
  4. Reduces chances of having wrong code pushed to further stages and prod and makes the process streamlined

Continuous Delivery/Deployment (CD):

After the continuous integration process comes the continuous deployment /delivery. This is where the code changes are deployed to staging servers and/or a production environment after the build stage. This of course depends on how your organization has set up the pre-production deployment process. Like many organizations, we have a QA or a UAT server before prod. So it will go through that process and deploy whatever is needed to run and test it.

In other words, setting up CI/CD pipelines means:

  1. Installing a CI server
  2. Defining a series of automated processes
  3. Run these processes every time a developer commits a code change

This is done either by writing code scripts or using some plugins available with CI servers.

Difference between continuous delivery and deployment

In continuous delivery, each code change is built, tested, and then propelled to a non-production testing or staging environment. But manual approval is required for pushing to the production environment.

If there is no manual step and it is automated, that process is called continuous deployment.

Advantages of Continuous Delivery

  1. Automatic release of the software
  2. Enables you to perform additional types of testing like UI/UX testing, API reliability testing, load testing, etc.

Appendix

Commit: It is a change or addition of new code that is checked into the repository

Build: A build is converting source code files into an independent software artifact that can be run on a computer.

Build artifacts: Build artifacts are files produced by a build. Typically, these include distribution packages, WAR files, reports, log files, and so on.

Unit testing: In computer programming, unit testing is a software testing method by which individual units of source code are tested.

2

--

--