An introduction to the continuous delivery pipeline, including best practices, benefits, and important CD tools.
What is continuous delivery?
Continuous delivery lets development teams automate the process that moves software through the software development lifecycle, and it can provide many benefits when provisioning an integrated toolbox, including the following:
- Reduce time to deployment through continuous testing and development
- Decrease the costs associated with traditional software development
- Scale software development based on project size
- Deploy code automatically into each phase of the development cycle
In the following video, Eric Minick explains more about continuous delivery:
The following are a set of best practices to consider when using continuous delivery:
- Make every change releasable: If you use continuous delivery to make every change releasable, you must include user documentation, operations runbooks, and information about what's changed, for auditing purposes.
- Embrace trunk-based development: Continuous delivery builds on continuous integration. Avoid branches that delay integration as much as possible so that every change is built, tested, and deployed together for the fastest feedback.
- Deliver through an automated pipeline: To successfully implement continuous delivery, you need a well-constructed, automated delivery pipeline to ensure all your code releases move into your test and production environments in a consistent way.
- Automate as much as possible: In continuous delivery, you must automate as many processes as possible in your software development lifecycle to create a good, reliable delivery pipeline, not only for code builds and deployments but also for the creation of new development environments.
- Aim for no downtime: To ensure application availability while you make frequent, continuous delivery updates, when you push a new function to production, you must first validate it before deploying it to the public running application instance.
- Release at the granularity of test: If two parts of a system must be tested together, they should be released together so that you know that the parts of your system are compatible. Release automation tools are good at coordinating this kind of delivery. Alternatively, fully decouple.
To take advantage of the benefits of continuous delivery, you need other elements of the continuous framework, such as continuous exploration, continuous integration, continuous deployment, and release on demand.
When you use continuous delivery pipeline stages, you should divide them into separate jobs, which are execution units within a stage:
- Build jobs: Compile your project in the build job to prepare for deployment, where you generate artifacts that you can send to a build archive directory.
- Deploy jobs: Upload your project to your continuous delivery pipeline as an app that you can access from a URL. After you deploy your project, you view it on your dashboard.
- Test jobs: Customize and include test jobs before or after your build and deploy jobs based on your suite of unit tests or functional tests with third-party test services.
The following are a few of the things that the continuous delivery pipeline will help you do:
- Automate builds, unit tests, and deployment
- Edit and push code by using Git repositories, issue tracking, and your web-based IDE (integrated development environment)
- Create an integrated DevOps toolbox to build, deploy, and manage your apps with your services, open source tools, and third-party tools
- Edit your code from anywhere you choose to use your IDE to create, edit, run, debug, and complete source control tasks
- Use your automated pipeline to continuously deliver builds, tests, and deployments in a repeatable manner
- Improve quality by understanding your build status, security scan results, code coverage, and test coverage so that you can evaluate whether to promote your app to the next environment (through policy gates to automatically ensure quality before promotion)
Continuous deployment vs. continuous delivery
Continuous deployment can be part of a continuous delivery pipeline. Specifically, continuous delivery is the automated movement of code through the development lifecycle (sometimes called the delivery lifecycle); continuous deployment is the automated movement of that code into production, once it passes the required automated tests.
Whether you make continuous deployment part of your delivery pipeline depends on your business needs. If the business needs the delivery team to release new or updated software out to production repeatedly, reliably, or as quickly as possible, or if the solution has multiple dependencies, then it is likely you will benefit from continuous deployment.
For more information about the differences between continuous deployment and continuous delivery, see this video:
A continuous delivery tool enables you to use open source tools to build, deploy, and manage your applications. By integrating sets of tools, you can create repeatable and manageable tasks, not only for your development team but also your operations team.
Your toolbox can include your current cloud services, open source tools, and third-party tools, but you’ll also want to consider a continuous delivery tool that includes the following:
- Repeatable templates for build and deployment automation. If it works for one of your apps, it should work for others. Don’t let every team struggle with configuration themselves.
- A pipeline so you can automatically build when pushing changes, deploy to your cloud, incorporate builds and deployments into your toolchains, and manage deployments across your toolchain.
- Tools for team collaboration, planning, source-code management, and testing.
- Instrumentation that exposes where your team is moving quickly and where things bog down, providing a guide to becoming “more continuous.”
Open source continuous delivery tools you can use for a strong continuous delivery pipeline include:
- Concourse CI
- Travis CI
- GitLab CI
Agile and DevOps
Agile continuous delivery
Previously, you would only release software once and then update it. You would then only consult customers at the beginning and the end to see if the software met their needs.
Agile is a way of producing software in short iterations on a continuous delivery schedule, and today’s agile continuous delivery process means you can release code to the customer as each defined feature becomes available. Agile development and continuous delivery are your keys to getting features to the customer as soon as production-ready. Your goal is to have each feature ready for release as it exits the pipeline.
Learn more about the benefits of agile principles.
DevOps and continuous delivery
In the last couple of decades, software development has undergone significant changes as it's moved from the standard waterfall concept to the more efficient agile methodology. To adapt, you need to shift to an approach focused on agile, DevOps, and continuous delivery. As part of a continuous delivery pipeline, these focused processes enable more reliable, high-quality software releases and updates.
As you make more rapid, smaller software releases through agile development, your focus will become tighter on the individual stages of software development. At the same time, DevOps keeps your mind focused on the “Bigger Picture” and cultural change as development and operations merge closely into one team working on the entire software development lifecycle, from coding to testing to deployment to support.
For a closer look at the DevOps process, see “DevOps: An Essential Guide” and the following video:
Continuous delivery and IBM Cloud
IBM Cloud Continuous Delivery lets you embrace DevOps in an enterprise-ready and cloud-native way by creating toolboxes that support your app delivery tasks to automate builds, tests, and deployments.
For complex applications, IBM UrbanCode provides support for just about any application being deployed just about anywhere.
- Read the eBook, Application Release and Deployment for Dummies.
- Explore IBM UrbanCode to accelerate and manage the process of building, integrating and deploying applications.
- Tutorial: Adopt a DevOps approach by using IBM Cloud Continuous Delivery.