How to deliver code faster with CI/CD

This 3-minute video explains how to use continuous integration and continuous development to deliver apps faster and with higher quality

Your development team has been asked to deliver more frequent improvements to a production application used by customers and employees.
The team starts by discussing how it can deliver more frequent releases. Among the general issues that it has to consider as changes happen faster are:
• the stability of the production application
• reducing defects
• improving security
Some of the specific current issues that must be addressed could include:
• Builds and tests fail right before the release
• QA tests are manual and take too long to execute
• There are too many manual steps to push applications to production
The devops practices of continuous integration and continuous delivery — called CI/CD — can address many of these issues.
You start with continuous integration, a development approach where code integration occurs more frequently and software builds are automated. Here are some of the steps you might do to achieve continuous integration:
Check code into the Git code repository daily and focusing on small incremental code changes that can be more easily pushed into production
• Automate some of the critical tests and make sure that every build is successful only if these tests pass. In other words, make sure your continuous integration includes continuous testing.
Fully automate the builds to include all software components and trigger builds when new code is merged to the development branch in Git.
The next method to achieve faster, more frequent code releases is to invest in continuous delivery. Continuous delivery is the automation that pushes code changes to the development, test, or production environments and executes any steps required to run the application with the new code.
To achieve continuous delivery, you have to change some of your setup, to make them more automatable.
For example, all the database connections, API endpoints, user names, passwords, and other parameters should be set as environment variables, encrypted, and assigned values for the target environments.
You also should package the application and its dependencies using a container technology like Docker or Kubernetes.
You then implement automated testing — including performance and security tests — that can run during the delivery process.
And you must automate all the delivery steps and have equivalent rollback steps in case a delivery ever fails.
The results of this whole process is called a CI/CD pipeline.
Once you have your CI/CD pipeline defined, you want to make sure that it delivers as expected. You do that by monitoring code quality metrics such as defect rates and reopen rates.
With much of the infrastructure and deployment automated and built on more standardized architecture, your operations engineers can focus more time on improving application performance or addressing security risks.
You also should have metrics, called KPIs, for demonstrating key business impacts. Be sure to monitor your KPIs to both assess your delivery and identify opportunities for further improvements.
Thanks to the adoption of continuous integration, continuous testing, and continuous development, your team can now prioritize small improvements on a daily deployment schedule while developing new capabilities over a longer period.