welcome everyone to another topic on ci cd pipeline using jenkins now in this one we are going to talk about that how exactly we can go for a csid implementation with a pipeline concept and that too with the help of jenkins tool so let's talk about what exactly we're going to talk about now uh first of all we are going to talk about like what exactly is in devops process and then we are going to talk about what is the importance of ci cd pipeline uh then we are going to take care of a kind of a sample pipeline which is there a kind of a building a ci cd pipeline with the help of jenkins here and then in the end we are going to see a small demo on how we can do this setup so that we can have some particular pipeline processed and executed and processed all together so let's talk about the different things one by one now the first one is that what exactly is in devops here now devops is basically a combination of two practices like that is the development and operations so development is having their own task of doing the development and preparing the source code and operation is responsible for deploying the source code to a specific environment whether it's a production or any you know other environment so they take care of all those tasks creating the virtual machines managing performing the patching and number of tasks there from the operations perspective now development is something which keeps on working on the source code there on the development and they are responsible for keeping a particular uh product up and running so they um do the performance they you know they do the coding they do the uh particular interaction with the testing to you know validate their source code a huge number of activities is actually done by the development team and they eventually uses an n number of tools like scripting tools coding tools development tools a lot of tools they basically use to support their development because they are performing different kind of programming they it could be a possibility that more than one programming language is being used for your project so that's kind of you know wider scope is present as such over here when we talk about the devops here now from the operations perspective uh it's basically a team which is responsible for managing the workforce right and it's something which we can use to see that all the daily uh activities and operations should be managed effectively and efficient so that's the main important uh point over here that whenever we are working with the operations whenever we are working on that we should be able to get a kind of a decent amount of work and decent amount of activities managed with the help of operations teams here so operation teams is pretty much responsible for keeping the environment up and running and whatever the activities and maintenance work we want to do we will be able to do on that now devops really helps us to achieve a lot of milestones over here now let's talk about that one by one so very first one of that is that it helps us to get a frequent release of deliveries here now we were doing the releases prior to devops also but that was not that much frequent probably people were doing like every quarter every three months four months that kind of time duration was being used by the team to uh deliver the source code or deliver into a specific environment but the moment the uh specific devops comes into the picture the frequency of this release uh really increased a lot so some organization in fact uh trying to do like every month release twice a month so that's the kind of frequency which we are getting when we move on to the devops so that really helped and you know got efficient with the introduction of devops here now second one is the team collaboration now that is also improved drastically because earlier the operations and the development teams were not working in that collaboration they were like working involved in their own task but with the help of devops they really come along and you know had a very good team collaborations which really helps them to increase the overall productivity and the performance of the product so these are the prime milestones which we achieve with the implementation of devops as such into a project another one is that it helps to get a kind of a management a better management here so effective and efficient management is what we get with the help of devops because ultimately you have redefined your processes you have implemented certain development tools certain automations and that really helps you to increase the overall management of all your unplanned work so the planning is something which got really improved with the help of devops and faster resolution of issues because the way you are delivering your uh source code to the production environment you are pretty much doing it into a less duration of time and when that is happening definitely there is an kind of a increase in the number of bugs which is getting a result and there is another benefit that you know ultimately the number of bugs which you are getting in production that drastically reduced in case of devops so since we are getting less number of issues than bugs it's very easy for us to do the resolutions quite quickly and implement into a specific production environment right so devops today is being implemented by you know most of the major organizations whether it's a financial organization whether it's a kind of a service organization every organization is somehow looking forward for the implementation and the adaptation of devops because it totally redefines and automate the whole development process all together and whatever the manual efforts you were putting earlier that is simply or gets automated with the help of these tools here so this is something which get really implemented because of some of the important feature like a ci cd pipeline because cicd pipeline is responsible for delivering your source code into the production environment in less duration of time so cicd pipeline is ultimately the goal which really helps us to deliver more into the production environment when we talk about from this perspective now let's talk about that what exactly is a ca cd pipeline now when we go into that part when we go into that understanding so cicd pipeline is a basically continuous integration and continuous delivery concept which is used or which is considered as a backbone of the overall devops approach now it's one of the prime approach which we implement when we are going for a devops implementation for our project so if i have to go for a devops implementation the very first and the minimum implementation and the automation which i'm looking forward is actually from the uh particular ci cd pipelines here so cicd pipelines is really a wonderful option when we talk about the devops here so what exactly is the pipeline term all about so pipeline is in series of events that are connected together with each other it's kind of a sequence of the various steps like you know typically when we talk about any kind of deployment so we have like you know build process like we compile the source code which under the artifacts we do the testing and then we deploy to a specific environment all these various steps which we use to do it like manually that is something which we can do it into a pipeline so pipeline is nothing but a sequence of all these steps interconnected with each other executed one by one into a particular sequence now the pipelines is responsible for performing a variety of tasks like building up the source code running the test cases uh probably the deployment can also be added up in when we go for the uh continuous integration and continuous delivery there so all these steps are being done into a sequence definitely because sequence is very important when we talk about the pipeline so you need to talk about the sequence the same way in which you are working on the development and in a typical world the same thing you will be putting up into a specific pipeline so that's a very important aspect to be considered now let's talk about what is the continuous integration here now continuous integration is also you know known as the ci uh pretty much you can see that a lot of tools are actually named as ci but they are referring to the continuous integration only so continuous integration is a practice that integrates the source code into a shared repository and it used to automate the verification of the source code so it involves the build automations test cases automation so it also helps us to detect the uh issues and the bugs quite easily and quite faster that's a very early mechanism which we can do as such if we want to resolve all these problems now continuous integrations does not eliminate the bugs but yes it definitely helps them uh you know easily to find out because we we are talking about the uh automated process we are talking about the automated test cases so definitely that is something which can help us to uh find out the bugs and then you know the development can help on that and they can you know proceed with those bugs and they can try to resolve those things one by one so it's not a kind of automated process which will eventually remove the bugs bugs is something which you have to recode and you have to fix it by following the development practice but yes it can really help us to find those bugs quite easy and help them to remove now what is the continuous delivery here so continuous delivery also known as cd is in kind of a phase in which the changes are made uh into the code before the deployment now in this case what happens that uh it's um something which we are discussing or we are validating that what exactly we want to deliver it to the customer so what exactly we are going ahead or we are moving to the customer so that's what we typically do in case of continuous delivery and the ultimate goal of the pipeline is to make the deployments that's the end result because coding is not the only thing you code the programs you do the development after that it's all about the deployments like how you're going to that to perform the deployment so that is a very important aspect you want to go ahead with the deployments that's right you can go there and that's a real beauty about this because it it's in kind of a way in which we can identify that how the deployments can be run or can be executed as such here right so the ultimate goal for the pipeline is nothing but to do the deployments and to proceed further on that right so when both these practices are placed in together in an order so all these steps could be referred as in complete automated process and this process is known as cicd so when we are talking about like when we are working on this automation so in that case what happens that we are looking forward that how the automation needs to be done and since it's in kind of a ci cd automation which we are talking about so it's nothing but the uh end result would be like build and deployment automation so you will be taking care of both the build and the test case executions and the deployments as such when we talk about as such the ca cd here the implementation of chcd also enables the team to do the build and deploys quite quickly and uh efficiently because these are things which is you know happening automatically so there is no manual efforts involved and there is no scope of human error also so we have frequently seen that while doing the deployments we may miss some binaries or some miss can be there so that is something which is you know completely removed as such when we talk about this the process makes the teams more agile productive and the uh confident here because um the automations definitely gives a kind of a boost to the confidence that yes things are going to work perfectly fine and there is no issues as such present now why exactly jenkins like jenkins is what we typically understand or we you know uh here and there that's in ci2 it's a cd tool so what exactly is jenkins all about so jenkins is also known as a kind of orchestration tool it's an automated tool which is there and the best part is that it's completely open source yes there are some particular or paid or the enterprise tools are there like cloud b's and all but there is no as such of offering difference between the cloudbees and the jenkins here so jenkins is an kind of open source tool which a lot of organizations pretty much implement as it is itself so even if they don't want to go um we have seen in a lot of big organizations where you know they are not going for the enterprise tool like cloud b's and all and they are going for the pretty much you know core jenkins software as such here so this tool uh makes it easy for the developers to integrate the changes to the project that is something which is very important because it can really help the teams to say that how the things can be done and how it can be performed over there so the tools is really easy for the developers to integrate and that's the biggest uh you know benefit which you are getting when we talk about these uh tools as such so jenkins is a really important tool to be considered when we talk about all these automations now jenkins achieves continuous integration with the help of plugins that is also a kind of another feature or benefit which we get because there are so many plugins which is available there as such which is being used and uh for example you want to have an integration with kubernetes docker and all maybe by default those plugins are not installed but yes you have the provisioning that you can go for the installation of those plugins and yes those features will start embedded up and integrated within your jenkins so this is the reason this is the main benefit which we get when we talk about the jenkins implementation so jenkins uh is you know one of the best fit which is there for building a ci cd pipeline because of its flexibility uh open source nature plug-in capabilities the support for plugins and it's quite easy to use and it's very simple straightforward gui which is there which can definitely helps us you can you know easily understand and go through the jenkins and you can grab the understanding and as an end result you will be able to have a very robust tool which using which pretty much any kind of source code or any kind of programming language you can implement ci cd whether it's an android it's a not net it's a java it's a node.js all the languages are having the support for the jenkins so let's talk about the csd pipeline with the jenkins here now to automate the entire development process a ci cd pipeline is the ultimate you know solution which we are looking forward to build such a pipeline jenkins is our best solution and best fit which is available here so there are pretty much six steps which is involved when we look forward for any kind of pipeline it's a generic pipeline which we are looking forward now it may have like any other steps which is available there probably some additional steps you are doing like some other plugins you are installing but these are the basic steps which is there like a minimum pipeline if you want to design these are the steps which is available there now let's see the first one is that we have the uh required java jdk like a jdk to be available on the system now most of the operating systems are already available with the gre like a java gre but the problem with gre is that it's only for the build process it will not be doing the compilation you can run the artifacts you can run the jar files you can you know run the application run the code base but the compilation requires the java c or the java jdk kit to be installed onto the system and that's the reason why for this one we also require the jdk and certain linux commands execution understanding we need to have because we are going to run some kind of steps some installation steps and you know process so that's pretty much required now let's talk about how to see a cd pipeline with jenkins now first of all you have to download the jdk and uh that is something which is installed so after that you can go for the jenkins download now jenkins dot io slash download is the website is our official websites of jenkins now the best part is that there you have the support for different operating systems and platforms from there you can easily say that if you want to go for a java package like a war file tucker ubuntu deviant centos fedora red hat windows open sushi uh freebsd ganto mac operating system in fact whatever the different kind of artifacts or different environment or different uh application you want to download you will be able to do that so that's a very first thing to start up on you download the generic java package like a war file then you have to execute it you have to download that into a specific folder structure let's say say that you have you know created a folder called jenkins now you have to go into that jenkins folder with the help of cd command and there you have to run the command called java hyphen jar and the jenkins dot bar there so these are the executables uh artifacts so uh war files can be easily executable jar files bar files can be easily deployed so just because with the java command you can run them you don't require any kind of web container or application container as such so here also you can see that we are running the java command and it runs the applications as such and once that is done so you can open the web browser and uh you can open like localhost colony tt so jenkins uses atd port just like a tomcat apache so uh if you know once the deployment is done installation is done so you can just open the localhost colony now if you want to get uh the jenkins up and running in the browser probably you can you know go through the uh public ipad address also there so you can put the public ipad as calling 880 and that can also help you to you know start accessing the jenkins application now in there you will be having an option called create new jobs so you need to click on that now once the uh particular new job new item new job that's a different naming conventions which is available there now all you're going to do is that you're going to do like you are proceeding with the creating the pipeline job so you will be having an option called pipeline job over there just select that and provide your custom name what pipeline name or job name you want to refer or you want to process there now once that is available so what happens that it will be an easy task for us to see that how exactly we can go ahead and we can perform on that part so this can really help us to see that how a pipeline job can be created and you know performed on this modifications as such now when the pipeline is selected and we can give a particular name that this is the name which is available and then we can say okay as such over there now you can scroll down and find the pipeline section so there what happens that when you go over there and say that okay this is the way that how the pipelines are managed and you know those kind of things so you will scroll down and find the pipeline section and go with that pipeline script now when you select that option there are different options which is available like how you want to manage these pipelines now you are you know have the direct access also like if you want to directly create the uh create a pipeline script you can do that if you feel that you want to manage like you want to retrieve the jenkins files also scored management tool also can be used there so you can work on that also so like this there are so many a variety of things which is available like which you can use to work around that how exactly the pipeline job can be created so either you can fetch it from the source code management tool uh like gate version or something like that or you can directly put the pipeline code as such over there right now so next thing is that we can configure and execute a pipeline job with the direct script so uh we can once the pipeline is selected so you can put the particular script like jenkins file into your uh particular github link so you you may be having like already a github link so that they where the jenkins file is there so you can make use of that now once you process the github link so what we can do is that we can proceed with that and uh once the processing is done so you can do the save and you know you can keep the changes and you know it will be picking up the pipelines you know the pipeline script is added up into the uh github and you know you have already specified that uh let's just go ahead with this jenkins file pipeline script from the github repository and proceed further now once that is done so what next you can do is that you can go with the build now process you click on the bill now and once that is done so what will happen that you will be able to see that how the build process will be done and how the build will be performed over there so these are pretty much a kind of a way so you can click on the console output you will get all the logs that is happening in the inside that whatever the pipeline steps are getting executed all of them you will be able to get or you will be able to you know get on that part there so these are the different steps which is involved as such and uh the sixth one is that you know uh yes whatever the uh particular uh when you run the build now you will be able to see that source code will be uh you know will be checked out and will be downloaded before the build and you can proceed with that part now later on if you want to change the url of this github you can configure the job again the existing job and you can change that url github link url whenever you require you can also clone this uh job whenever you go ahead and you work on that and that's also kind of you know the best part which is available as such right and uh then you can have the advanced settings over there so in there you can put like your github repository you can say like okay uh the github repository is there so i'm just going to put this url and you know with that what will happen that the settings will be available there and the jenkins file will be downloaded as such and when you run the build now you will be able to have a lot of steps like a lot of configurations going on so uh then the checkout sem so uh we can have a declaration like checkout sm which is there so when the checkout sm is there so it will check out a specific source code after that you go to the log and you will be able to see that each and every stage which is being built up and executed as such okay so now we are going to talk about a demo here so on the pipeline here so this is the jenkins portal now you can see here that there is an option called create a job you can either click on the new item or you can click on the new uh create a job here now here i'm going to say like a pipeline uh then you know you can select the pipeline uh job type here now you have the free style pipeline github organization multiple branch pipeline these are the different options which is available there but i'm going to continue with the pipeline here as such so when i selected the pipeline and say okay so what will happen that i will be able to see a configuration page which is related to the pipeline now here the very important part is that you have all the uh general build trigger you know options which is similar to the freestyle but the build step and the post build step is completely removed because of the pipeline introduction now here you either have the option to put the pipeline script all together you can also have some particular example for example let's talk about some github maven uh particular uh tool here so you can see that uh we have you know got some steps as such over here and you know it's pretty much running over there now you run it it will work smoothly it will check out some source code but how we are going to integrate like the version the jenkins file into the version control system because that's the ideal approach we should be following when we create a pipeline of a ci cd now i'm going to select a particular pipeline from sem here then go with the git here now in there the jenkins file is the name of the file of the pipeline script and i'm going to put my repository over here in this one now this repository is of my gate which is like having an even build pipeline which is available there it's having some steps related to ci for the build and deployments and that's what we can follow as such over here now in this one the uh if it is a private repository definitely you can add on your credentials but this is a public repository a personal repository so i don't have to put any kind of credentials but you can always add the credentials with the help of add here and that can help you to you know set up whatever the credentials private repositories you want to configure now once you save the configuration here now what it's going to do is that you it's going to give you a particular page related to build now uh if you want to run if you want to delete the pipeline if you want to reconfigure the pipeline all these different options are available there so we are going to click on the build now here and when i do that immediately the pipeline will be downloaded and will be processed now you may not be able to get the a complete stage view as of now because it's still running so yeah you can see that the checkout code is done then it's going on to the build okay that's one of the steps which is there now once the build will be done so it will continue with the next steps with the next further steps there so you can also go to the console output log here like you can click on this or you can click on the console output to check the complete log which is happening there or in fact you can also see the stage wise logs also because that is also very important when you go for the complete logs uh it may you know have a lot of steps involved and you know a lot of logs will be available there but if you want to see a specific log of a specific stage that's where this comes into the picture and as you can see that all the different uh steps like test cases executions the scenar cube analysis the archive artifacts deployment and in fact the notification so all this is a part of a complete pipeline this whole pipeline is done here and you know you get a kind of a stage view it's success over here and the artifacts is also available to download so you can download this war file is a web applications as such over here so this is what our typical pipeline looks like that how the automation the complete automations really looks like as such over here now this is a very important aspect because it really helps us to understand that how the pipelines can be configured can be done and pretty much with the same steps you will be able to automate any kind of pipelines as such so that was the demo to build a simple pipeline as such with the jenkins and uh pretty much in this one we understood that how exactly the cicd pipelines can be configured and we can use them and we can get hold on that part so that's it for this topic i hope you got to understand now that what is the cicd pipeline and how we can automate it with the jenkins so thanks everyone yeah bye-bye [Music] hi there if you like this video subscribe to the simply learn youtube channel and click here to watch similar videos turn it up and get certified click here