What is a CI/CD Pipeline?

Ash Powell
Glasswall Engineering
5 min readNov 25, 2020

In the last ten years, software engineering has evolved substantially. Developers all across the globe have completely transformed the way they build, test, and deploy software.

From the old, monolithic development style where a big chunk of code was pretty much the entire application, today we’ve adapted to microservices that aim to reduce code, create flexibility, and follow the install-deploy-run workflow. Furthermore, the modern developer can benefit from previously unheard-of tools and frameworks. Version control, Agile workflow, packages, and Gradle are just a few among the thousands of systems orienting the digital world towards a DevOps scenario. A consequence of such DevOps oriented adoptions is CI/CD and its pipelines. But what is a CI/CD pipeline? What would be an ideal CI/CD pipeline?

https://www.synopsys.com/glossary/what-is-cicd.html

What is CI/CD?

Continuous Integration (CI), Continuous Delivery (CD), and Continuous Deployment (also CD) is a set of methods and practices that aim to create an automated, seamless, secure, faster, and high-quality product for clients. CI/CD achieves this by focusing on three critical areas of software development: building, testing, and deployment. It creates a workflow where building and testing are done in smaller, precise, and automated steps, and deployment frequency is increased. Continuous Integration is the practice of merging the work of all developers working on a project to a shared CI server, such as a GitHub repository. The CI server then clubs all the code after each commit and performs a set of tests to verify whether all the code is secure and error-free. Another advantage of CI is that it allows all developers to stay in the loop regarding what the other developers are working on so that no compatibility issues surface when it’s time to merge the code. While CI takes care of the testing and building aspects, CDs (both of them) focus on the deployment of your software application. Often used interchangeably, Continuous Delivery and Continuous Deployment are related concepts that focus on automation in the final stages of the work cycle. CD is responsible for automatically converting your software from development to production environment while conducting a series of final-stage testing and making intelligent decisions at the end of the pipeline.

What are Pipelines?

In computer science, a data pipeline — more commonly referred to as a pipeline — is a series of processing stages performing predefined actions on provided data or code. Each output of a stage becomes the input to the next stage within the pipeline. These stages may be initiated one after the other or simultaneously. The aim of using a pipeline is to automate a set of repetitive processes to save time and increase precision.
A key tool that pipelines leverages off is ‘abstraction’. Abstraction is the design principle in computing wherein a data element knows nothing more than it’s supposed to, which keeps the system concise and efficient. Just like a car driver doesn’t need to understand how an engine works while driving the car — which keeps their mind clear of unnecessary information — abstraction within a pipeline makes each process efficient and reliable. These advantages of pipelines make them highly compatible and efficient with CI/CD infrastructures. This creates a category of pipelines dedicated exclusively to CI/CD operations. Specifically, a CI/CD pipeline is a pipeline that conducts a series of processing steps that intend to update and deliver a newer version of a software application. The elements that constitute a CI/CD pipeline include building (the compiling of software), testing (compatibility and error checks), releasing (application updates on the version control repository), deployment (conversion from development to production environment), and compliance and validation checks. The goal is to make the building, testing, and delivery faster, automated, and more reliable than manual processing. To that end, an ideal CI/CD pipeline takes care of both: integration and delivery.

An Ideal CI/CD Pipeline

An ideal CI/CD pipeline will have excellent abstraction, multi-facet testing at each stage, compatibility checks, support for version control operations such as automated commits, pull requests, etc. among various other features.

This is a typical CI/CD pipeline that we like to use; It begins with the developer writing the code and performing basic unit tests. Once the developer is ready to commit the code, the code enters the pipeline. The first processing element within the pipeline is automated unit testing. The first set of unit tests includes tests of each component. Once that’s taken care of, the pipeline moves to commit this code to the repository. This is where Continuous Integration starts. A pull request is automatically created, and gated build (gated commits) are formulated. Parallel to the Gated Builds, the pipeline performs further unit tests and code quality reviews. In this way, the code is made visible to other developers via the pull request, and the chances of code breakdown are reduced via gated build. Finally, once the pull request is sanctioned and peer reviews are done, the continuous integration build is generated. Now, the pipeline shifts to continuous delivery. Smoke tests are performed sequentially on both, the Dev and the QA environments. The QA environment also goes through automated regression testing that can find any additional defects or critical failures. Although optional, software companies can choose to then deploy into performance testing and security testing environments to provide a true DevSecOps work cycle. The final steps in this CI/CD pipeline include staging the code and releasing it into the production environment. As you can see, all the developer had to do was write code, and everything from building, testing, to deployment, can be entirely automated — with greater speed and reliability!

Such is the power of Glasswall’s ideal CI/CD pipeline.

Final Thoughts

CI/CD has become the most trending work cycle of software development. With the right pipelines and workflows, enterprises can see production at a speed and quality they could never imagine! A genuinely automated, fast, seamless, and secure CI/CD pipeline such as that of Glasswall promises very high monetary perks for your software enterprise and outstanding product quality for your clients! We hope you’ve enjoyed this post and found it enlightening. If you’ve got some thoughts in your head, put them down in the comments section, we’re eager to hear you out!

--

--