Jenkins Beginner Tutorial 1 - Introduction and Getting Started

Jenkins Beginner Tutorial 1 – Introduction and Getting Started



Jenkins Beginner Tutorial 1 – Introduction and Getting Started
==================================================

Jenkins
– java application
– used for continuous integration and continuous delivery

Step 1 : Download Jenkins war file –

Step 2 : Place the war file into any location on your system

Step 3 : goto command prompt (windows) | terminal (mac)
– goto folder where jenkins.war is
– java -jar jenkins.war

Step 4 : goto browser – (Jenkins window should show up)

Step 5 : install required plugins

Step 6 : get started with Jenkins

____________________________________________________________

To see hidden files/folders on mac:
1. Exit Finder
2. On terminal – defaults write com.apple.finder AppleShowAllFiles TRUE
3. Press option/alt – right click finder – relaunch

Reference Picture :

________ ONLINE COURSES TO LEARN ________

Visit –

———— UI TESTING ————
Selenium Beginners –
Selenium Java Framework from Scratch –
Selenium Python –
Selenium Tips –
Selenium Builder –
Katalon Studio –
Robot Framework –

———— API TESTING ————
Web Services (API) –
SoapUI –
Postman –
General –

———— MOBILE TESTING ————
Mobile Playlist –

———— CI | CD | DEVOPS ————
Jenkins Beginner –
Jenkins Tips & Trick –
Docker –

———— VERSION CONTROL SYSTEM ————
Git & GitHub –

———— PERFORMANCE TESTING ————
JMeter Beginner –
JMeter Intermediate –
JMeter Advanced –
JMeter Tips & Tricks –
Performance Testing –

———— JAVA ————
Java Beginners –
Java Tips & Tricks –

———— MAVEN ————
Maven –

———— OTHERS ————
Redis-
Misc –
Tools & Tips –
QnA Friday-
Sunday Special –

Ask Raghav-
Interviews –
All Playlists –

———— Follow ————
Facebook –
Twitter –
Youtube –

hello and welcome to this session on Jenkins beginner tutorial so this will be a series on Jenkins and we will start with very basics on how to get things started with Jenkins how do we get Jenkins what is Jenkins and then we will go to some intermediate topics on how to create jobs in Jenkins we will look into some plugins and then we will look at how do we actually do continuous integration with Jenkins so this is going to be a very basic step-by-step guide for Jenkins and if you are a total new beginner for Jenkins this is the tutorial for you ok so let us begin and see Wow what is Jenkins and why we use it okay so Jenkins is a java application okay so because it is our application it is platform independent and it does not require any specific platform you can use Jenkins the same way whether you are on Windows or you are on Mac or any other operating system I am recording this tutorial on a Mac but this will be exactly the same in Windows as well and I will tell you if there are any differences so you do not have to worry about the operating system that you are using okay and why is Jenkins used it's used for continuous integration and continuous delivery now what do we mean by this continuous integration and continuous delivery let us look at this picture and if you look at the green portion above okay what happens normally is when we work in teams we have different developers who develop the code and they keep on working on changing or enhancing the code and as the developer walks on his own machine and he changes the code he will check in the code into some shared repository which can be a gate or a bit bucket or TFS anything right now what happens is let's suppose through the entire day there are many developers who are changing the code and check in the coordination repository at the end of the day when you have a build let's suppose there is some bug introduced in any of the code and now the build failed now it would be very difficult for us to identify what exact code failed the build and I to what point was this bug introduced in the code and then you have to go back and check in you know all the code that was created that day and they will be a lot of confusion okay so here comes Jenkins what does Jenkins do is as soon as any developer commits a code in the shared repository genkan will take that latest code and trigger a build okay and the build notification will be sent out so in case there is any problem with the build or there's any error you will be get you will get notified as soon as the build gets triggered and builds completes okay so we can check that if there is any issue due to any commit we can reverse that and we will not waste a lot of time in finding out what code caused the break okay the other thing is let's suppose the build is successful we can also integrate our unit tests or acceptance test or performance tests along with the build as a post build actions in Jenkins and it will be automated so as soon as the build gets deployed Jenkins will trigger a trigger some test cases or some testing which will be automated and it will send out a report back to us okay so let's suppose the build was successful there was no exception but due to the changes in the code there was something which broke in the application so we will come to know instantly that there is some break due to this code and we can troubleshoot it so you can see how efficient and powerful the entire system can be and this is what is called as continuous integration we are taking the code and doing a build as soon as the code gets commit and then we are also triggering the test and we are sending back the report so as soon as there is any change in the code this entire cycle gets triggered and we come to know if there is any issue with the application so this is what continuous delivery is all about and this is how Jenkins fit into the picture okay so let us start with downloading and getting started with Jenkins and step one will be download Jenkins ok so let us go to our browser and I will just say Jenkins and the very first site I get is Jenkins dot IO let us go there and as soon as you go to this site you will see this download Jenkins now we have two options one is the long term stable release and the other one is weekly release so weekly releases whatever they are are developing they put it here so we can take it from here but I would prefer that you take this support release which is like stable release and you can click on the war file as soon as you click you will get this a war file will get downloaded to your system as of now I am cancelling this download because I already have it ok so you will download Jenkins and step two is place the war file that you get into any location on your system okay so in my case I have put this file under desktop Jenkins okay you can see the Jenkins thought war file is present here now what we have to do is to start Jenkins you have to go to your command prompt in Windows or if you are on a Mac you have to go to terminal and you have to go to this particular folder wherever you have put the Jenkins dot war file okay so step 3 will be go to command prompt in case of Windows or terminal in case of Mac and there you have to type the command you have to first go to folder where Jenkins taught war is and then you have to type this command Java – jar Jenkins dot war ok so let me go to my terminal here and I will first go to the folder where my Jenkins dot war is ok so I'm going here and now I will say Java – jar Jenkins dot war and enter so as soon as you click enter you will see some information coming here here so this is extracting from war file Winstone is the server and it will take a couple of minutes and once this entire process is done your Jenkins will be up and running and you can access it through a browser on port 8080 ok now see it also gives me a password for admin so I will just copy this password ok so whenever you start Jenkins for the first time it will be asking you an admin password so I will just copy this here okay so once this is done what we have to do as step four is go to browser and you have to say localhost 8080 okay of course JTP will be there so what does localhost means localhost means your local machine so you can also get the IP of your machine instead of localhost and 8080 is the port on which Jenkins will be running okay so if I go to my local host 8080 now you can see it is asking me for that password right so I will give the password which I got from here this one okay now this password will also be saved in your dot Jenkins secrets initial admin password so in case you cannot find it here you can go here and get it and I will show you how as of now I am just going and I'll put this password and say continue and now it will start my Jenkins initial screen okay now as soon as you enter the password it will ask you to install some plugins so you have two option one is installed suggest plugin so what it will do is all the suggested plugins will start getting installed as soon as you click here but what we want we want to select the plugins ourselves so I am clicking here ok now you can see all the plugins are listed out and the green ones are the ones which are which are already selected so if you if I go here and say all all programs will get selected if I say none none of the plugins will get selected and if I say suggested only the suggested plugins will get selected here ok and here I can browse by the category of plugins so organization at administration plugins you can see what all plugins are available if I want to see build tools I will click here and I can see what are the plugins available for build tools if I want to say notification and publishing lick lick here and I when I'm getting the list of all the plugins for notifications and publishing and now we can select whatever plugins we need for starting and then click on install okay so I'm not selecting anything is but yes oh you can select the suggested plugins okay and then you can click on install so that all the plugins will get installed into Jenkins okay after that after the plugins are installed you will get this screen create first admin user so you can create any user or you can continue as admin so if you create some users you will get a separate user otherwise you can continue as admin okay you can start using Jenkins so now we have downloaded and started our Jenkins and this sister home window of the Jenkins okay now we also should be aware of where are all our plugins in the Jenkins directory so if you go to if I am on a Mac I will go to my user folder and here you will get a dot Jenkins folder okay now here I am not getting it because it is a hidden file in a hidden folder and if you are on a Mac what you have to do is go to a command prompt and you paste this default right you can exit from the finder and I want to see all my hidden files in Windows you must be knowing how to do it but for Mac you have to run this command and then press the option or the Alt key and right-click on the finder and click on relaunch okay now if I go to my user folder I am going with command shift G and going to my user folder and now you can see it has showing me all the hidden files as well and I will find the dot Jenkins folder here okay so this is my dog chen kun's folder and inside this folder I will have all the configuration logs and everything little Jenkins and the plugins as well so this time I have not installed any plugins if I would have I will get all the plugins in this folder ok similarly in Windows you can go to your user folder and then they will be a hidden folder called dot Jenkins where you will get all the Jenkins folders and files ok so this is how we start Jenkins and you can say step 5 will be installed required plugins and 6 is get started with Jenkins ok home window ok so now we have this Jenkins started and in the next session we will start creating jobs so this is how we will be started getting jobs in Jenkins and then we will see it at some of the other plugins ok so this is how we download and start with Jenkins hope you like it too thank you

21 thoughts on “Jenkins Beginner Tutorial 1 – Introduction and Getting Started

  1. Hey Raghav, If you are reading this, i have one question. I need to set up a dashboard in my jenkins for few jobs with status of pass or fail for test cases. Is it possible, can you please guide me.

  2. I am facing an issue with java 12 , do java version 12.0 support jenkins ? it is saying it should have java 8 to 11 versions

  3. Hi! I want to know that is there any possibility to create a Jenkins file or any other way to use Jenkins to download a file(Like a build file) from a ftp server. It would be really helpful if you can suggest a way to that.

  4. While following your video i faced some issue, From my side one suggestion or request it is better if you show what kind of issue we may face while using or installing the app. It will be effective if you go with negative scenarios, where we will face maximum issues and this is my concern and request too .
    Thanks

  5. Getting this error "could not create Java Virtual Machine"
    Error : A fatal exception has occured. program will exit

  6. I really appreciate your efforts and knowledge but, you need to change the way you're recording your voice because the sound quality is terrible. I can hardly hear you clearly πŸ™

  7. big fan of your explanation..!!
    one request though..will you upload videos on kubernetes as well as travis CI

  8. Excellent stuff Raghav. One query – do you have any plans to share videos on Jenkins and running Selenium Automation
    Scripts on BrowserStack.

  9. is there any way I can contact you to show you an error that Im getting when executing the Jenkins.war? Im totally new in Jenkins so I have no idea what the error that Im getting means

Leave a Reply