What is CI/CD development?
Before jumping directly to the point let us know why there was a need for it. It will surely make us better understand why the hell we have to study this thing.
Earlier Development Process:
Developer after the completion of their whole source code of the software, puts(or commits) the code on repository like Github, SVN, etc. After the code completion, the code is now ready to get build(code compilation and other processes). After the build is complete, software/app is deployed on test server for testing purpose. All of these processes take a lot of time as the code is long and so the time taken to process it is also large.
So, In case of any bugs while doing testing, developers are informed and again the whole process needs to be repeated i.e. development -> build -> testing -> packaging -> etc.
If there is no bug the app is ready to be deployed further in production server(i.e. for customer or client to use) for release.
See below figure to understand the process I explained above.
Now lets see the disadvantages of this development cycle:
- Developer has to wait to get test results, which take a lot of time because all of the source code has to go through the process at once (more than once if there are any bugs or failures).
- If the source code has bugs, then developer has to review the code again and then entire code again go through build and test phase.
- So in short lots of time is getting wasted which can be utilized by developers for other development processes.
- Also, continuous feedback is missing i.e. we are giving feedback only after bugs are found and not the status of build, test, packaging, etc.
Solution: Continuous Integration(CI)
Unlike the old process, here we don’t play with the entire source code in one go. Rather full code is divided into modules and each module is assigned to different developers. And as soon as one module is completed, it is committed to Github by the developer and automatically fetched for ‘build’ by CI tool (e.g. Jenkins).
And here we give status/feedback at every step to the developer about build failure/success, test failure/success, etc.
So here all developers don’t have to wait for the module to get completed as they are still working on their own part.
As we are continuously integrating the code with proper feedback at every step and no delays, it is called Continuous Integration
Also earlier with old model, final deployment of software is only done after the whole code has passed through each and every step(which takes a lot of time as we know). But with CI, after completion of every module it is ready for deployment and can be delivered easily and hence known as continuous delivery(CD).
As the water flows through each section of pipe one by one. The process is known as CI/CD pipeline(as process goes through ‘series of steps’ or ‘our pipeline’).
Please refer below figure to see CD pipeline flow:
Some most used tools for creating CI/CD pipeline are:
Jenkins (open source AND support for many ‘build’, ‘test’, ‘dev’ tools is available), buildbot, bamboo, travis CI, etc.
Let me know if you enjoyed or any other feedback.
You can find me here on Linkedin.
Thanks for reading!