In the DevOps Principles lesson, you saw that DevOps automates the tests and the deployment.
A CI/CD pipeline is a series of automated steps that take the code from a commit to production.
Figure 1 - The Steps of a CI/CD Pipeline
The name has two parts:
CI means continuous integration.
CD means continuous delivery or continuous deployment.
A new commit pushed to Git starts the pipeline.
A CI/CD server, such as Jenkins or GitLab CI/CD, runs each step.Answer the question below
A CI/CD pipeline is a series of ... steps.
Continuous integration is the first part of the pipeline.
Developers merge small changes into the main branch often, and the pipeline checks every change:Build: the pipeline packages the application into an artifact, such as a Docker image, and stores it in a registry.
Test: the pipeline runs automated tests on the code.
When a test fails, the pipeline stops, and the change does not reach production.
The developer sees the error right after the commit.
Figure 2 - A Failed Test Stops the Pipeline
Answer the question below
Which step creates the artifact?
CD is the second part of the pipeline: it deploys the artifact.
The pipeline first deploys it to staging, which is a copy of production used for final tests.
Figure 3 - Continuous Delivery and Continuous Deployment
CD has two meanings:
Continuous delivery: the code is always ready to deploy, and a person approves the deployment to production.
Continuous deployment: the pipeline deploys every change to production with no manual step.
Answer the question below
With continuous ..., a person approves the deployment to production.
A pipeline also works for the network.
You store the device configuration in Git, as you saw with infrastructure as code.
Figure 4 - A Pipeline for the Network Configuration
Validate: the pipeline checks the syntax of the configuration.
Test: the pipeline applies the change to a virtual copy of the network.
Deploy: a tool such as Ansible pushes the change to the devices.
A network pipeline gives three benefits:
Fewer errors: every change is tested before it reaches the devices.
Faster changes: a tool runs every step, not a person.
History: Git keeps every version, so the team can go back to the previous configuration.
In the next lesson, you will see CML and pyATS, two tools that build and test a virtual network.
Answer the question below
Which step checks the syntax of the configuration?