How To Create Jenkins Job - First Jenkins Freestyle Job

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey having this is mukesh rothwani once again from learnheifenrenovation.com today in this video we'll talk about how you can create a jobs in jenkins so till now we have discussed how to download install configure jen games so if you haven't seen that videos i would highly recommend you to watch the series where we discussed all of this now we are going to create a new job and this job is a sample job just to show you how to create a job how you can execute the job once you move ahead we will click different type of jobs and different way to execute the same so this video is going to be very basic but yes once your basics are clear you can also do this job configuration and running part in a different way so the two options you can click on create a job or you can click on new item the moment you click on create a job you will be navigating to the same options or if you go back to new items you will also get the same window so again we have a different type of jobs that you can create okay so you can see we have freestyle project we have pipeline we have multi configuration project folder organization github organization and multi branch pipeline so basically we will be focusing on the first one which is freestyle pipeline multi branch pipeline and once you move it we will also install one maven plugin so that we can build maven projects okay so as of now i will give this job as job one or demo one it can be anything so let me just give first jenkins job now what exactly job in java uh in jenkins is you can consider a set of tasks or activities that will perform a particular task okay so it is just we are calling as a job but this job can be any task that you want to perform so as of now i will click on freestyle project and i will click on ok so it will create a job for us and it will ask some configurations so let's configure this again it's a basic configuration as of now so once you move ahead it depends on your requirement you can configure accordingly so you can see we have multiple options the first option is general settings then we have source code management okay from where i exactly want to have the code then we have build triggers how do you want to trigger the build then the build environments most important part build in the build section it will tell you exactly what you need to build and finally the post build action once your post once a bill is done what exactly you want to perform so let's see one by one so in the general one as the name say you can give the description of this job so i will just give a dummy description that this job is just a sample job but you can give any description again you can also give html tags here okay again you have some options here that we will discuss later as of now let's come to source code management which is do you want to get any code from you know sem so you can use github get lab and you can just give the repository url and it will take this code from that particular scm now will trigger how do you want to run this build okay so you can trigger this build remotely you can also build this after other projects are built you can also build this periodically using you know crown pattern polar sim and so on and these are some build environments as of now the main part is what exactly we want to build so as of now i just want to select some windows batch command but if you're working with let's say mac or linux or unix you will be selecting shell the first command that i want to run is echo okay i just want to say whether this our first jenkins job is working fine or not so i will just say echo and maybe we can do one thing we can print java version because in the last video we have configured java right so i will just say java space hyphen version if i'm able to get this java version it means gen case is working fine let me add another build strap this is another build step which i was ambient hyphen version which basic basically should give me the maven version and post build action what exactly you want to do once you're done with this you know build so we will be doing this editable email notification build other projects and so on as of now just give this commands and let's save this so once your job is done as you can see this is your job team and this job is basically a simple job now you can click on this option which is build now the moment you build you can see now i can click on this icon or i can click on this candy icon it's totally up to you both will redirect you the same so basically it is navigating to the console so the first one is java space hyphen version okay and space ambient space hyphen version so basically this is my java version which i'm getting and this is i'm getting maven version it means i'm able to run my jenkins job jenkins is working fine now this is your default view as you can see this is your all view where you have the status of the build then you have the weather name last success failure duration and again this build option so you can click on this and it will again start running a jenkins job okay you can see again it executed i go to dashboard again it executed now in your case you might not get this symbol you get this symbol in blue color i will show you how you can get in green color okay i just installed a plugin called green ball plugins in the upcoming session that also we will see now suppose you want to create your own view how you can do that okay so suppose i don't want this weather information i don't want this you know build option directly here so i can customize this as you can see i have this option right i can create my own view i will say let's selenium i'm just giving one view name i will click on list view and now i can select which column which i want in this view okay so basically i don't want this weather information i don't want this build button now i just want to click on apply and okay so you can see i have now new view so by default it was all view now i have created another view and i can add existing jobs here so as you can see this is the job that we created if i select this particular job if i click on apply and okay i can see i have another view in this view and this view what is the difference in this view i have this weather information and in this view i don't have so i can customize this view i can have n number of views i can also change what should be the default views and so on so that's how you can create a first gen case job just go to the build and give whatever steps you want to perform that's all now you must be wondering why we are just printing java version maven version so guys this is just for testing purpose just to make sure that everything is working fine in real time we will be building our maven builds right so we'll pull the code from github and we will run about maybe we'll build that maven build will run our testing dot xml files and that xml files will run our automated test cases it can be selenium test api test mobile test or any other kind of test so once you move it you will understand the real use cases this is just the first jenkins job that we have created just to make sure that everything is working fine and you're able to run your build so that's all for this video guys in case if you're new to this channel then make sure you subscribe this channel share with your friends and i will see in the next video have a nice day bye
Info
Channel: Mukesh otwani
Views: 7,679
Rating: undefined out of 5
Keywords: how to create jenkins job, how to create freestyle project in jenkins, jenkins job, jenkins beginner tutorial
Id: u2TpnY1Mmts
Channel Id: undefined
Length: 7min 59sec (479 seconds)
Published: Thu Apr 22 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.