CI/CD Pipeline
Do you want your engineering team to deliver bug-free code at a high velocity?
A fast and reliable CI/CD pipeline is crucial for doing that sustainably over time.
What is a CI/CD pipeline?
A CI/CD pipeline helps you automate steps in your software delivery process, such as initiating code builds, running automated tests, and deploying to a staging or production environment.

What is a CI & CD?
Continuous Integration (CI) and Continuous Delivery (CD), set of operating principles, and collection of practices that enable application development teams to deliver code changes more frequently and reliably.

What are the benefits of CI/CD pipeline?
- Developers can stay focused on writing code and monitoring the behaviour of the system in production.
- QA and product stakeholders have easy access to the latest, or any, version of the system.
- Product updates are not stressful.
- Logs of all code changes, test and deployments are available for inspection at any time.
- A fast feedback loop helps build an organizational culture of learning and responsibility.
Elements of a CI/CD pipeline

1. Source stage
- In most cases, a pipeline run is triggered by a source code repository.
- A change in code triggers a notification to the CI/CD tool, which runs the corresponding pipeline.
- Other common triggers include automatically scheduled or user-initiated workflows, as well as results of other pipelines.
2. Build stage
- We combine the source code and it’s dependencies to build a runnable instance of our product that we can potentially ship to our end users.
- Failure to pass the build stage is an indicator of a fundamental problem in the configuration of our project and it’s best to address it immediately.
3. Test stage
- In this phase, we run automated tests to validate the correctness of our code and the behaviour of our product.
- The test stage acts as a safety net that prevents easily reproducible bugs from reaching the end-users.
- The responsibility of writing tests falls on the developers and is best done while we write new code in the process of a test or behaviour-driven development.
- Depending on the size and complexity of the project, this phase can last from seconds to hours.
- It’s essential for this stage to produce feedback to developers quickly, while the problem space is still fresh in their minds and they can maintain the state of flow.
4. Deploy stage
- Once we have a built a runnable instance of our code that has passed all predefined tests, we’re ready to deploy it.
When the master is broken, drop what you’re doing and fix it.