The ability to respond to user feedback and ship new application code to production quickly and safely are hallmarks of successful digital enterprises. Continuous integration and continuous delivery (CI/CD) play an important role in this process. A CI/CD pipeline allows your organization to dramatically speed up the process of creating and testing new application code and readying it for production deployment. By utilizing agile software development methods, automating CI/CD processes, and taking a DevOps approach, software teams are able to deliver code changes quickly and securely while maintaining a stable operating environment.
What is CI/CD?
CI/CD is a DevOps practice that automates building, testing, and deploying applications to production environments, connecting development and operation activities seamlessly. Continuous integration (or CI) automates the process of building and testing software, while continuous delivery (or CD) automates the delivery of software to a production-like environment. Together, the two processes enable an automated, end-to-end pipeline, capable of delivering new features and application updates more quickly, providing greater business agility.
Automation and continuous monitoring through all phases of app development are at the heart of DevOps and agile methods. A CI/CD pipeline is one of the most important assets for building, testing, and deploying modern applications. Continuous integration and continuous delivery forge a connection between a developer committing code and the delivery of new functionality to applications in production. Between the endpoints in a CI/CD pipeline, the code is built, verified with multiple tests, checked against audit and security controls, prepared for deployment, and, in some cases, automatically deployed to production.
With CI/CD, developers iterate quickly to create and test changes (inner loop) and release software to IT operators and production (outer loop) as soon as it’s ready.
What’s the difference between continuous integration and continuous delivery?
CI/CD refers to the combination of continuous integration and continuous delivery. A CI/CD pipeline may also include the related process of continuous deployment when desired. Some DevOps teams incorporate continuous deployment with continuous delivery. CI/CD is best thought of as an efficient process to automate the entire app development lifecycle. Whether continuous deployment is part of your pipeline or not, adopting the CI/CD process will still be highly beneficial.
Continuous integration (CI)
CI is the process of automatically building and testing software after new application code is integrated into a shared repository. CI results in application builds that are always in a working state. Unit tests are included as part of the CI process, validating the functionality of the software, identifying bugs up front, and preventing wasted cycles later.
Continuous delivery (CD)
CD is the process of delivering applications created in the CI process to a production-like environment where they are put through additional automated tests to ensure each application will function as expected when pushed to production and put in the hands of real users. CD also ensures the latest build interacts with other software and applications as intended.
When should you consider continuous deployment?
The terms “continuous deployment” and “continuous delivery” are easy to confuse. Continuous deployment is an optional continuous delivery pipeline step in which changes are automatically deployed to production after passing CI/CD. Continuous deployment can be a good approach in some cases, but there are also situations in which you may want to release code to production on a different cadence (say, based on the ability of users to absorb new features without being overwhelmed). Bear in mind that, in practice, continuous deployment may require a significant investment in testing to ensure changes do not cause havoc in production.
What are the benefits of CI/CD?
CI/CD has many advantages for organizations seeking to deliver higher quality software in less time:
Deploy software on demand based on business requirements.
Teams that practice CI/CD can quickly release new application code to production when it makes the most business sense to do so, rather than based on predetermined release windows.
Reduce the risk of software not functioning properly in production.
Code is put through rigorous automated testing before it’s released, significantly reducing the risk of introducing bugs or broken code into production environments.
Make rapid iteration a reality by combining CI/CD and DevOps or CI/CD and agile.
CI/CD complements agile development and DevOps methods by providing the functionality required to put continuous learning from users into practice, allowing teams to iterate and ship software in small, rapid batches to respond quickly to customer feedback.
Recover faster when failures occur.
In the rare instances when failures occur in production, CI/CD enables teams to reduce their mean time to recovery (MTTR) by quickly pinpointing bad code and pushing fixes to minimize the impact on end users.
Integrate with Kubernetes environments.
Enterprises can integrate Kubernetes, CI/CD, and containers to create scalable CI/CD pipelines that adapt dynamically to load while serving the needs of cloud native developers deploying to Kubernetes.
Automate software configuration and all the processes needed to deploy to production.
By integrating smaller amounts of code more frequently, teams reduce the amount of time it takes to integrate new changes into their product. Having the ability to build and test multiple times a day keeps the release schedule running smoothly.
CI/CD vs. Traditional Development
|Software is developed iteratively in small chunks based on frequent user feedback.||Software is developed in large, complex units with less timely user feedback.|
|Tests are written during development and applied throughout the development process to ensure code quality.||Software passes to a separate QA team for testing after the development process is completed.|
|Security patches and bug fixes are quickly deployed via automation.||Security patches and bug fixes are delivered immediately through manual exception processes or in bulk at irregular intervals.|
|New application code is integrated frequently with the existing code base and tested in real-world scenarios to ensure software is always ready for production.||New code is integrated infrequently with existing software—usually just prior to deployment—and occurs only in predetermined release windows that may be quarterly or even less frequent.|
What to keep in mind if you’re considering a CI/CD pipeline
Your build pipeline forges the connection between a developer committing code and new functionality reaching production. Properly done, a CI/CD pipeline automates the vast majority of the work required, freeing developers and operators from repetitive manual tasks. The CI/CD process helps teams ship high-quality software and services faster, but it requires changes to the development workflow and the adoption of new best practices. If you’re considering adopting CI/CD, you’ll want to understand the details and benefits of a CI/CD pipeline.
What is meant by CI/CD pipeline?
A CI/CD pipeline codifies and automates your path to production, incorporating the necessary processes described earlier for continuous integration (CI) and continuous delivery (CD) in sequence (hence, a “pipeline”) to eliminate reliance on error-prone and time-consuming manual build and testing tasks and accelerate the end-to-end process.
What is a DevSecOps pipeline?
In a well-functioning CI/CD pipeline, security can't just be something you check before production deployment. It must be integrated early and throughout the development process (aka, shift left) to ensure the software supply chain is secure. Security needs to be built into development processes and baked into the operation of the runtime platform, providing an end-to-end approach. Organizations that rely on Kubernetes and containers need to consider implementing DevSecOps to ensure that security policies are built into all development processes and automated to the greatest extent possible.
Aggiornamenti sugli argomenti importanti
What’s the relationship between agile development and CI/CD?
Agile development methods result in smaller, iterative bits of code that can be tested and delivered more quickly, enabling CI/CD.
What CI/CD best practices should my organization adopt?
The following list will help you understand the organizational and other adjustments that may be necessary when you adopt CI/CD:
- ◼ Break down siloed teams. With CI/CD, testing becomes part of the development process. There’s no need for a separate QA team that tests software at the end of the development process. The responsibility to test new code falls to development teams, requiring QA engineers to join with developers, designers, and project managers on balanced development teams.
- ◼ Commit to writing a lot more tests. To achieve success, development teams will have to write a lot more tests—including unit tests and end-to-end tests—to simulate user workflows throughout the application. This will take more time initially, but the upfront investment in testing gives you confidence in your build automation.
- ◼ Introduce new CI/CD tools and automation. Although CI/CD success requires organizational and process change, teams must also agree on and adopt new CI/CD tools to develop, implement, and monitor automated CI/CD pipelines. This means incorporating new testing frameworks, modern source code repositories, artifact repositories, and CI/CD tools such as Concourse.
- ◼ Rethink legacy approval processes. Getting new software to production the traditional way often requires successfully navigating one or more manual approval processes. Re-evaluate manual approval processes that can create bottlenecks and replace them with automated processes consistent with CI/CD.
Is my software ready to ship?
There are two related questions you must ask yourself when considering shipping software to production. Can we ship? And, should we ship? A team that can’t ship, can’t learn. And the longer you’re not learning, the greater the risk that you’re wasting time and money building the wrong thing.
The question Can we ship? is fundamentally an engineering question. Is the software in a working state? Are you confident it won’t fail in production?
Should we ship? is ultimately a business decision. Is it valuable to your business to put the latest features in the hands of users right now? The product manager (PM) represents the business interests on the team and should own this decision.
CI/CD customer stories
|It's easy enough to get a CI/CD pipeline set up and operational for one team or even a handful of teams. But in a large organization that requires compliance, governance, and coordination across hundreds of teams, putting good build pipelines in place takes some enterprise initiative. Learn how The Home Depot scaled CI/CD across the organization to get all the benefits of cloud native without sacrificing key enterprise requirements. Guarda|
|Implementing CI/CD can be a challenge. Add strict compliance requirements and the task is harder still. That didn’t stop Cerner. The healthcare solutions company uses Concourse for VMware Tanzu to move code from development to production in an ISO 9001 environment. With Concourse, code goes from development to production much more quickly. Guarda|
CI/CD at VMware
VMware Tanzu enables you to modernize your applications and infrastructure to deliver better software to production, continuously. We have the expertise and the advanced CI/CD tools and other software components to help put your team on a path to success.
VMware Tanzu Advanced Edition. Simplify and secure the software development lifecycle to speed the delivery of modern apps at scale.
Concourse for VMware Tanzu. Simplify build pipelines and scale cloud delivery across platforms and teams. Concourse integrates with a variety of DevOps tools and facilitates compiling source code, conducting tests, and running everything in containers.
VMware Tanzu Build Service. Automate container creation, management, and governance at enterprise scale.
VMware Tanzu Labs. Deliver the outcomes you want in the timeframe you need.
Related products and services
CI/CD tools are part of a set of technologies for building cloud native applications. VMware tools and services are purpose-built for developers to boost feature velocity and for operations teams to deliver world-class uptime.
Automate container creation, management, and governance at enterprise scale.
Boost feature velocity for developers and enable operators to deliver world-class uptime.
Streamline operations across multi-cloud infrastructure with an enterprise-ready Kubernetes runtime.
Get help building and modernizing apps and get to production quickly. Bring your CI/CD questions to a virtual office hours session.