Continuous Delivery Integration and Deployment
Continuous Delivery, Integration and Deployment
In the old way of software delivery, most of the time is spent in software development, the whole application is delivered without even running it for once and is then deployed for the testing phase. Testing is done for a large batch of software. Bugs are reported late in this process, and if because of some bug the deployment fails and it becomes tough to identify the exact reason of its cause.
In continuous Integration, you have an application that on every code commit build is created automatically, Unit tests are run, and application is deployed in the test-like environment.
Continuous delivery is to do automation and Integration testing on every build to catch early issues in the build.
Continuous Deployment extends continuous delivery, after completion of automated testing the code is deployed to the production.
Image Source – Prowareness India
One of the key reason for using this type of implementation process is that it reduces the time it takes to deliver the product in the market.
In 2016 survey report, it was found that a high performing software development company, deploys the application on demand basis as compared to the old process which took days or weeks to deploy the application which improves mean time to recover.
Another reason of using continuous integration, delivery and deployment are that it increases quality as inspection happens quickly instead of doing it in the end. It also shortens the lead time for changes, in other words, it reduces the task in progress and study say a large number of tasks in progress is dangerous for quality.
The goal of continuous integration is that software is in working state all the time.
Practices to follow for Continous Integration:
- The Build should be executed in less time (less that 5 min), though its just a number and may vary depending upon your application, but it should be less.
- Commit small code – the little amount of code is easy to debug and inspect.
- Don’t leave the build broken.
- Use trunk based or branch based development process.
- Don’t allow flaky tests. Fix Them. Flaky tests are those who sometimes fails not always. Fixing them is equally important.
- The build should return a state, a log and an artifact.
Practices to follow for Continous Delivery:
Continuous delivery is the practice of deploying the application in production like environment, perform automated integration testing and acceptance testing.
- Only build artifacts once.
- Artifacts should be immutable.
- Deployment should go to the production-like environment before deploying to production to do acceptance testing.
- Stop deployment, if a step fails.
- Deployments should be idempotent i.e redeploying should leave your system in the same way as before.
Types of testing which can be performed:
- Unit Testing – Unit tests can be performed just after the build is formed.
- Code Hygiene – to check the code formatting and banned function checks.
- Integration Testing – In this testing test cases are performed in an integrated environment.
- TDD (Test Driven Development), BDD (Behavior-driven development) and Acceptance test driven development are some of the functional test cases which can be performed.
- Performance Testing.
- Security Testing.
Different tools used at various stages of CD:
- Version Control – version control tool is used to maintain the versions of a build.
- CD pipeline tool – Jenkins, Go CD and Bamboo are some important tool in this area.
- Build tools – depends on the programming language – maven is famous with Java, TFS is famous with dotNet or C#.
- Unit Testing tools – again depend on the programming language. Junit is for Java, NUnit is for C# etc.
- Integration Testing – Robot framework, Cucumber along with Selenium are famous in this region.
- Performance Testing – JMeter and Apachetest are famous open source tools.
For more details on continous delivery, you can go through a book called Continous Delivery by Jez Humble or follow this link.
PS: For any questions, queries and feedback, feel free to write us at firstname.lastname@example.org or email@example.com. Happy Learning 🙂