CI/CD – continuous integration and continuous delivery followed by continuous deployment – is part of a software release process that is designed to speed up the time to market for software. Specifically CI/CD creates a pipeline of frequent testing, validation and deployment of code. It is part of a wider DevOps approach to software development which encourages greater levels of collaboration between development and IT operations teams.
In this blog post we’re going to cover:
- Why CI/CD is important and how to implement it
- What is CI/CD?
- Why is CI/CD important?
- Components of CI/CD
- Continuous integration
- Continuous delivery
- Continuous deployment
- How to implement CI/CD
- The right CI/CD tool stack
- Robust processes
- Get support
Why is CI/CD important?
CI/CD is important because it’s a new development, relying on leaps forward in process automation to radically reduce the software development lifecycle. With the increasingly rapid development of digital technologies, any tool that can speed up the time to market, whilst maintaining quality standards, will contribute to competitive advantage.
It’s also important because it signals a culture change. As an integral tool of the DevOps approach it starts to break down the silos between Operations and Development teams. Traditionally, developers are happy when their code delivers the functionality required. However, if it breaks in production, the Operations team has to fix it, slowing down the whole process.
In a DevOps culture, it matters less if the software worked on the developer’s machine but not in production, because changes are rolled out quickly – using the CI/CD pipeline – and are small and reversible. CI/CD provides a testing and learning loop so that developers and ops are working collaboratively towards rapid deployment.
Components of CI/CD
Continuous integration
CI is the practice of automating the integration of code changes from multiple developers into a single software project. Developers create and test code using an automated set of tests that validates the code before it’s integrated into the project’s shared repository. This allows development teams to build quickly and then test their code as often as possible rather than waiting until the end of the project or release date to merge the code.
Continuous delivery
CD is the next step in the process: following automated testing, CD automatically delivers code changes to a testing and/or production environment. CD releases code in small batches as early as possible, making it easier to fix problems quickly or revert. Robust test environment management processes and tooling are vital to ensure effective and efficient spin-up and tear down of test environments.
In some cases, and depending on the risk associated with the software project or particular elements of it, CD can include targeted scripted manual testing. This provides additional assurance over and above the automation and is particularly useful for higher risk projects.
Continuous deployment
Following automated testing and delivery, CD automatically releases every code change that passes all stages of the CI/CD pipeline. There’s no ‘release date’ and new features are released to customers regularly allowing for rapid feedback to developers on their work.
The advantages of this approach are clear – it fosters collaboration, rapid testing, deployment and feedback which means faster time to market, a higher quality final product and theoretically cost savings. However, it’s not entirely straightforward to implement.
How to implement CI/CD
There are two key elements to implementing CI/CD – the CI/CD tool stack and the processes in which the tools are used.
The right CI/CD tool stack
This is a tool heavy approach to software development. As a minimum CI/CD requires:
- A shared repository
- Automated testing tool suite
- Automated integration tests
- Automated build of the testing environment
- Automated build of the data required
- Automated business/acceptance testing
- Automated deployment tools
- And an automated destruction/rebuild of the testing environment.
These tools may be costly and are a significant investment for many businesses. If you are working on a less complex project, or in a small team, then this approach is probably overkill for what you need. However, as projects increase in complexity with multiple developers or development teams, then the investment in CI/CD tools starts to deliver a return on investment.
When building a CI/CD tool stack it’s worth considering the following issues.
Are you using your existing tools?
In some cases, software teams already have the tools, but they simply aren’t using them effectively. Implementing CI/CD means understanding what you want to achieve at every step, having the appropriate tool to meet that need and then using it correctly.
There is no one size of toolstack that fits all
There are literally hundreds of automation tools that might be the right size and shape for your needs. From complex – and often expensive – suites of tools that work across the CI/CD pipeline and further into other the DevOps processes to best-in-class single use tools. There are even a number of free tools that work exceptionally well.
The point here is that one-size rarely fits all and it’s vital that you think clearly about what tools you really need and will help your software testing programme rather than be swept along by the next big thing or a smooth talking salesperson.
Robust processes
Automation is only part of the story. Without robust and efficient testing processes, CI/CD will not give the best return on investment because it will work in a sub-optimal way.
Fit the tool to the process
One risk is picking a tool that just doesn’t fit into your existing processes. Teams can waste significant time and money bending processes so that they fit with a tool: it’s better to choose a tool stack that delivers on your needs and within your existing processes.
Tools aren’t perfect
CI/CD relies heavily on the use of tools, but there is the risk of overreliance on them. Automation means that you don’t necessarily see errors or systemic issues. It needs some common sense applied too which is why ensuring CI/CD fits within your wider processes is so important as this provides the checks and balances needed to mitigate this risk.
Get support
This is a complex area and consultancy support can help to bypass some of the more common problems in selecting a CI/CD toolstack. A consultant will be able to provide insight on the best way to set up the testing processes, where to automate and the best practice processes. Get in touch with us if you’re interested in hearing more for a no-strings-attached discussion about how we can help.
Leave a Reply