Get startedGet started for free

Constructing a CI/CD pipeline

1. Constructing a CI/CD pipeline

Now that you’ve been introduced to what CI/CD is, let’s explore how to construct and implement a CI/CD pipeline. A pipeline represents the stages involved in getting an application’s codebase ready to be released to production. Pipelines can be triggered manually or automatically. Let’s explore each stage of the pipeline. The first stage is build. During the build stage, the codebase is checked out to a specific version, and artifacts, for example Docker container images, are built. The deploy stage is next. This is when artifacts are deployed into a test environment that replicates the production environment. After the application has been deployed, it’s moved to the test stage. During this stage the application is rigorously tested to ensure its quality is high. The most common types of tests are unit, functional, integration, vulnerability, and performance. And finally, if the application passes every test, it moves on to the approve stage. During this stage, developers will decide if a pipeline should proceed to the production environment. Now it’s important to understand that there is no single version of a CI/CD pipeline, yet rather a variety that represents different types of implementations, which range from manual to almost completely automated. With manual pipelines–in other words, one that has no CI/CD–each developer is responsible for integrating and deploying all of the code that they write. They must also ensure that the new code does not conflict with any other developer’s code. Another less manual version of a pipeline is a packaged tool with a fixed set of built-in automation. This type of pipeline is completely reliant on a CI/CD tool. While these tools generally allow for very specific customization, it can make development difficult to frequently maintain and review. It’s not suitable for complex systems. Then there is dev-centric, or developer-centric, CI/CD, which centers the pipeline around the system’s code repository. An example of this would involve using GitOps, which is a methodology that stores both the code and configuration files in a source repository and then uses that source repository as the authority for an application. Within a Kubernetes environment, manifest and YAML files are stored and used to define the deployments for an application. To create these types of pipelines in Google Cloud, you can use Cloud Build. And the final pipeline example you’ll explore is ops-centric, or operations-centric, CI/CD, which prioritizes automating operational tasks like infrastructure management, monitoring, and incident response to ensure smooth and reliable software delivery. By streamlining operations, developers can free up time to focus on code. Spinnaker is a tool commonly used to implement ops-centric CI/CD, which is designed to handle very large deployments, with possibly thousands of instances. The cost of managing Spinnaker can be justified based on the scale of the deployment.

2. Let's practice!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.