Continuous integration, continuous delivery, and continuous deployment

Continuous integration, continuous delivery, and continuous deployment

DevOps – which combines development (Dev) with operations (Ops) – is a framework that optimises the software development and delivery process, making it faster, more efficient, and more secure. In our world of hyper-convenience, where better products, newer technologies, and quicker results are not only demanded but expected, it’s easy to see why businesses prize DevOps so highly. In fact, a survey by Harvard Business Review found that 86% recognise the significant value of DevOps practices.

Let’s take a closer look at two key elements of DevOps: continuous integration and continuous delivery.

What is continuous integration and continuous delivery?

Continuous integration and continuous delivery are software development practices.

Continuous integration (CI) integrates all code changes – early and frequently – into the main branch of a shared repository of source code. Each code change is automatically tested, and a new version built, when the codebase is committed or merged.

Continuous delivery (CD) automatically prepares code changes for release to production. Building on the integration process, it ensures that software always remains in a deployable state.

Why is CI/CD important?

CI/CD is the combination of continuous integration (CI) and continuous delivery (CD). Microsoft define CI/CD methodology as ‘a software development approach where all developers work together in a shared repository of code’. CI/CD pipelines automate the end-to-end software delivery process as part of the software development lifecycle (SDLC).

A critical component of the process is automated tests – such as unit tests and integration tests – designed to verify the quality and integrity of the code.

The benefits of adopting a CI/CD approach include:

  • easier and earlier identification of security issues, bugs, and errors

  • reduced likelihood of code conflict and deployment risks

  • ability to make small, incremental code changes

  • a continuous testing and feedback loop

  • elimination of bottlenecks

  • enhanced collaboration resulting from multiple software developers and DevOps teams working on the same, open source application

  • automated testing and code validation checks

  • easier version control

  • faster, more reliable, more secure software

  • agile solutions that can respond quickly in line with changing demands

  • resource and time savings

  • competitive advantages for both businesses and their customers

What is the difference between continuous delivery and continuous deployment?

AWS outline the difference between continuous delivery and continuous deployment as ‘the presence of a manual approval to update to production’. Continuous delivery requires every code change to be built, tested, and pushed to a testing/staging environment or non-production environment. The CD process can involve ‘multiple, parallel’ test stages before deployment. Continuous deployment, as its name suggests, involves automated deployment without explicit, manual approval or human intervention.

How does the CI/CD pipeline work?

The CI/CD pipeline is an automated process that enables development teams and operations teams to push code from development to production. For example, a business might be launching a new product, deploying bug fixes, building new software to meet a business need, or improving the functionality of, or adding new features to, an existing product to better serve end-users.

The sequence of steps in the CI/CD software delivery pipeline:

  1. Source code control. New code changes are ‘committed’ to a shared code repository, such as GitHub or Bitbucket. This triggers the pipeline, and the latest code is integrated.

  2. CI. A CI server – such as CircleCI or Jenkins – then ‘pulls’ the latest version of the code and begins the build process. Automated tests, API tests, and integration tests follow.

  3. CD. The new code is then staged for deployment, manually approved, and then deployment to the live environment.

  4. Monitoring and feedback. Tools are used to monitor and assess the health of the software apps and identify errors or performance issues.

An example of the CI/CD pipeline is:

  • Commit

  • Build

  • Test

  • Deploy to staging

  • Manual approval (if applicable)

  • Deploy to production

  • Monitoring

What are the best practices and tools for implementing CI/CD pipelines?

Thinking about implementing a CI/CD pipeline? Want to optimise it to its full potential? Keen to adopt practices and tools to deliver the best software outcomes?

Here are some key practices to consider in CI/CD implementation and the software development process:

  • Use a version control system (VCS) for your code, files, configuration, and scripts to maximise collaboration and traceability. Branch-based workflows are particularly handy.

  • Isolate software environments – including development, testing, staging, and production – and, ideally, ensure that they’re identical.

  • Make the most of automation, from builds and test automation to deployments and tracking, to speed up and streamline software delivery and reduce manual errors.

  • Consider small but regular commits – where code is packaged into small batches – to minimise risk and accelerate operations.

  • Embed comprehensive testing to ensure full coverage and reliable software releases.

  • Keep the pipeline secure through security practices (DevSecOps) such as security audits, static code analysis, and vulnerability scans.

  • Plan for fast fixes by ensuring your pipeline ‘fails’ quickly in the event of a test or build break, enabling development teams to address issues in real-time and not after the release process.

  • Invest in continuous monitoring to identify performance issues and errors and use automated rollback strategies and feature flags in the event of critical events to avoid downtime and damage.

Popular CI/CD tools include:

  • VCS tools – such as Git or Subversion

  • CI/CD orchestration tools – such as Jenkins, CircleCI, or Azure DevOps

  • Automated build tools – such as Docker, Gradle, or Maven

  • Automated testing tools – such as Selenium, JUnit, or NUnit

  • Infrastructure automation tools – such as Terraform or Ansible

  • Deployment tools – such as Kubernetes, Helm, or Docker

  • Monitoring tools – such as Splunk, Prometheus, or ELK Stack.

Learn how to elevate software delivery through continuous improvement and efficient workflows

Carve out a new career in the high-demand IT and digital sector – and apply your computing skills to solve real-world business challenges – with City St George's, University of London’s 100%-online MSc Computer Science programme.

Equip yourself with the knowledge and expertise to excel in a broad range of IT-focused roles, with no prior computer science knowledge necessary. Our comprehensive, wide-ranging curriculum teaches you the essentials of the IT discipline – including software and app engineering, computer architecture, artificial intelligence, cybersecurity, programming, and data analysis – and is designed with industry needs in mind to help you succeed.