School Of Basics | What is CI CD | What is CI CD Pipeline | Interview questions

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to this episode of school of basics i am raghav and today i am going to explain you in a very very simple way what is ci and cd so this is the topic for today ci cd now ci stands for continuous integration and cd stands for continuous delivery and also for continuous deployment so let us see what exactly this is and after this video you can always explain ci cd to anyone with actual examples so let's start and i will start with a real world scenario in a project in a organization we have processes and it starts with a dev process so any project any application or development any software project starts with a depth process so we have a dev phase then we have a testing phase and then we have a deployment and release phase so let me write down the phases so we start with dev then we have test and then we have deployment phases and then we can have release or release can be a part of deployment or after deployment we do the release process and i will tell you about that now coming to ci ci stands for continuous integration and the ci process happens mostly into the that phase a now ci or continuous integration is the process where the team members integrate their code or their work in a shared repository and this process is best achieved by using some scm or source code management tool like git so they integrate their work on a daily basis it is mostly done daily that is once a day everyone everyone in the dev team will integrate and check in their work in the shared repository and this check-in is then followed and validated by our automated build and automated unit tests so this is what the ci process is and you can also see the definition on your screen so let me again repeat ci or continuous integration is the process where the team members integrate their code or their work in a shared repository this process is best achieved using a scm or source code management tool like git and every check-in is followed and validated by an automated build and automated unit tests and they can also be some automated integration test that we run to make sure that everything is fine there are no errors and this process is mostly done daily that is once a day but as per your need as per the requirement of the project it can be done as frequent as needed this is the process of ci so ci process so the ci process is uh expands from the depth phase until some part of the testing or the qa phase because most of the tests are unit tests which are automated at the dev end and they are they run automatically after the build or after there is an automated build but then we can also add some of the integration tests from the test environment and then we can say that the code we have deployed today or the code we have integrated today is all fine without any errors so this is the process of ci now coming to cd or continuous delivery now after the ci process if we also do a deployment on a production-like environment it can be a qa or can be a staging environment and then we run some automated tests to ensure that this code this build is now ready to be deployed we call this process as continuous delivery so basically the goal or the aim of continuous delivery process is to make sure that the build is always in a deployable state or a deployment ready state so confidence delivery or cd expands from dev until the testing phase or the qa phase and if i also include the environments here to make it even more clear so we have a dev environment we have a test environment we have staging now staging environment is a production like environment it it is sometimes also called as pre-prod environment or pre-production environment and the goal here is that we create an environment or we keep a environment exactly like a copy of our production so that we before deploying anything on the production we can check it on the pre-prod or the staging environment and also if we want to check anything instead of going to the actual prod environment we can check it on the staging or the pre-plot environment so we have a staging or pre-prod here and then we have a production environment so if i talk about a continuous delivery it starts at the never environment and then goes until the staging environment so it will go until here which is the staging environment so here the goal is that our build our code is now ready to be deployed on any environment so this is continuous delivery now when we talk about the next cd that is the continuous deployment here we along with doing ci and continuous delivery we also do our production deployment so this is automatic deployment to production and every change every uh release that passes through all the automated tests is then directly deployed to production environment now this may not be practical in some of the organizations uh that they they do not have so frequent and so short release cycle so confidence deployment is not done automatically but then there are organizations who do very frequent and very fast deployments if you think about facebook or other very big organizations where we do some changes on a daily basis there we follow continuous deployment because every change that passes through all the stages all the automation tests is then directly deployed into production so this is continuous deployment so along with ci cd we are deploying to production which is again an automated process and all the changes that passes through all the automated tests are deployed directly into production let us now understand ci and cd in a very very basic ways in terms of the stages and the environment so let us suppose we have these three very basic typical stages in any project that is build test and deploy we also have a release stage but for now let us look at these three basic stages when we talk about ci or continuous integration then ci expands from the build stage until some part of the testing stage because here we are doing the integration of the code and then after a successful build and code integration we also run some unit tests within the dev environment and can also run some functional tests from the qa environment to make sure that our integration the integrated code is now working and there are no errors or no issues so ci expands from the build to some part of the test stage if i talk about cd that is continuous delivery it includes the ci process and then we also deploy it on a pre-prod or a staging environment so here the continuous delivery process will expand until the deployment stage and now when we talk about continuous deployment in cd or continuous deployment we do ci and cd that is continuous delivery plus we also do deployment on the actual production environment so here we can say that we are also doing the release of our software to the final production environment so cd or continuous deployment process will expand until the release stage now if i also include the environments that is the dev environment the qa the staging and the production environment now the ci process will expand until the qa environment the cd or the continuous delivery process will extend until the pre-production or the staging environment and then the continuous deployment process will extend until the final production environment so this is in the very very basic ways this chart you can keep it in your minds forever and this is the complete process of ci and cd so again if you see the phases ci is mostly in the depth phase and can also expand until some part of the testing or the qa phase cd is from the depth phase it is ci plus the deployment to a staging environment so that we can run some our automated test cases the integration the acceptance test cases all the automated functional test cases and then after this stage after continuous delivery our code is ready to be deployed to any environment and then it goes until the staging environment that is a production like environment and then when we talk about continuous deployment it goes until the final production environment and does the automated deployment to the production now after production after deployment to production we also have phases of monitoring and then also getting feedback and improving our code and improving our entire process and that is when we actually integrate everything together and we call this complete process as devops that is development and operations which include all the processes in a project management with all automated things every all the processes automated and linked and integrated with each other but if you talk about ci cd continuous integration delivery and deployment this is what ci and cd is and we also talk about a term called ci cd pipeline so again this is the exact same thing that all these processes of ci and cd are integrated with each other they have automated triggers like when the first process is completed and it is passed it will then trigger the second process if it is completed and it is passed it will trigger the third process and so on if we chain all these processes with the automated trigger we call it as a ci cd pipeline so i hope now all these terms are very clear to you if you have any questions you can let me know in the comment section below and also you can suggest me the next topic for school of basics in the comments below i will meet you in the next episode never stop learning
Info
Channel: Automation Step by Step
Views: 67,152
Rating: 4.9380617 out of 5
Keywords: difference between continuous delivery and continuous deployment, difference between continuous integration continuous delivery and continuous deployment, ci cd pipeline beginner tutorials, school of basics by raghav pal
Id: k2aNsQKwyOo
Channel Id: undefined
Length: 10min 59sec (659 seconds)
Published: Tue Feb 23 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.