Hello and welcome to this session on Jenkins
beginner tutorial This is the sixth session and today we are going to see some basic configurations
on Jenkins Okay, so let us go to our Jenkins and you see this manage Jenkins menu I'll
click here and then I will go to configure system Okay, so step one is you go to a Jenkins
you go to manage Jenkins and then you go to configure system Okay, and then inside this
menu you can see some options are there right? And today we are going to look all the common
and basic options and configurations in Jenkins Okay, so step is get an Understanding of common
and some basic configurations. So this is what we'll do today So let us begin
and inside the many Jenkins and configure section. The very first thing that you see is the home
directory is on this system and all your plugins and other logs and related information will
get into this Particular home directory Okay So in case you want to change your home directory
of Jenkins, you can watch one of my earlier tutorial the 3rd session on this series how
to change home directory So this is this particular option gives you the information about your
home directory, Okay If you click on Advanced you can see there is the root directory and
you can change the path from here and then there is a built record directory Okay, so
What is the root directory if you click on this help section? It will tell you the workspace where Jenkins
will store all the build information Okay, so all the build information and the workspace
for this particular Jenkins is present here Okay, and the root directory here the Jenkins
will store all the bills records on the file system Okay, so you if you want you can change
it However, it is not recommended And you can keep it as it is Okay, let us go to the
system message So what is this is a system message Let me put some message here This
is an example system message and let me go to preview and what will happen is let me
also start a new window Okay, so I have put some message here and I will click on apply. Okay, and now you can see on my Jenkins home
screen there is this message getting displayed Okay So if you want to display this message
or notify your users with some particular message, you can put the system message here. The good thing is that you can provide HTML
content here and you can use HTML tags For example, I want to make it as heading 1 I
will use the HTML tags H1 and Close this tag and preview and this is how it will display
now apply it and let me go here And yes, I am betting an HTML message now so you can
use HTML tags You can put an image or a link anything Right So this is how you can use
a system message in case you are not able to use the HTML tags You should go to your
manage Jenkins and configure global Garrity and look at the mark of for matter if it is
plain text changes it to save HTML save it and then you should be able to use the HTML
tags inside system message Okay, let us go to number of executors Now What does this
mean is? The number of executors is the number of parallel
jobs that this particular Jenkins instance should be able to run So if we want that this
Jenkins should run at Max five parallel jobs. We can give the number here and it will run
at the max 5 jobs at one time Okay To understand labels and the other usage of labels We will
need to go to node configuration and I will just tell you very basics of what does this
mean is? Let me go to my Jenkins and go to manage Jenkins
and if you go down you will see an option called managed nodes Okay Now what does this
mean is in Jenkins? We have a system for distributed bills What
does this that mean is I can make my Jenkins as a Master machine and then I can add notes
to this particular Jenkins so I can add different machines to this Jenkins and I can say that
the execution should take place on different nodes and not on the Master machine So for
that I have to go to manage nodes and you can see I can add a new node here We're okay
So adding a new node simply means that you are adding a new machine. I can say add a new note I can give any name
Let us say this is Windows to I make it permanent agent and okay and I have to give some configurations
here Okay now here again We have number of executors right and here if you go to the
help section, it will tell you the maximum number of the concurrent build that the Jenkins
May perform on this agent Okay? So here I can control the maximum number of
builds or jobs on this particular agent by giving the value for a number of executors
Okay? Then we have the label here So again, let
us say if I gave it a name as Windows machine to okay, and now I can say in the usage section
only build jobs with label expressing Expressions matching this node. Okay What does this means is I can now let
me save this Okay, let me also go to another node Let us say Windows machine go to configurations
and let me also add Windows machine one Okay, I'm adding a labels here in different notes
and I will just tell you what exactly is the use of these labels and I'll click save okay
Now see I have added few nodes machine and I have given some labels to those node machines
Okay Now let me go to any of my existing jobs You can also create a new job by clicking
on new item here I am going to my existing job and saying configure okay, and now Yes
in the general section You see this set this option restrict where this project can be
run Okay, and now it gives you a label expression Okay, and in this label expression, I can
give any expression which can be a reg X so see as soon as I am giving i'm typing something
all the labels that I had added are coming by default so Windows machine one Windows
machine two and so on are coming so if I select Windows machine one here okay it is saying
label service by one node that means this label is configured with only one node and
this particular job will be serviced by only this particular node which has the label Windows
machine one but I can also make it reg ex okay let me try it out okay, it is not taking the
reg x but ok but yeah see again Windows to is serviced by this particular label which
has this particular label the machine and similarly I can use any label Okay So this
is what the use of labels is in Jenkins and we will look into it into very deeper details
in the coming sessions But for now you should be able to know that what does label means
and how can we use it? Okay So this is the use of labels, okay? What is quiet period So quiet period is the
number of seconds that this particular Jenkins instance should wait before triggering a job
and why this is important is because suppose you your job is auto-scheduled to run at some
particular time or the job can be triggered as soon as they will take place. So in if you go to a job configuration You
have built triggers, right? So you can trigger remotely you can trigger
periodically or you can pull an SEM Okay, so SEM means as soon as somebody will commit
their code in a source repository like get the job will get triggered Okay, but we want
that They should be a time Gap or they should be asleep interval
before between the job getting triggered and the build actually getting Into into the source
code repository Okay Now the reason we are why we have this quiet period is because if
we have it as zero, I would do not have any quiet period the job will get triggered as
soon as there is the trigger coming to Jenkins For example, there is a built committed in
to get the job will trigger but we have seen that sometimes the the commit is not successful
or it takes some time in commuting all the files By experience will come to know that
our particular project or job How much time Gap does it require and the same time Gap
we can give here as quite period Okay Now the next option is SCM Check out retry count
What does this mean is as we have seen here One of the bill trigger is poll SCM So what
does this mean is? It will try to connect to a source code repository,
Okay, and we'll try to get the latest build information Okay, in case it fails, what is
the maximum retry count our Jenkins should do Okay So they're that number we can specify
here Okay the next option is restricted project naming and By default, the default option
is selected, but we can also select role-based strategy or pattern suppose I give a pattern
and I say test, Okay, and now if I apply it, so see it's now I go to my Jenkins Home page
and go to new item If I try to give any name for a new project It will not take it because
ABC does not match the job name convention pattern test.star So I have to I'm now forced
to give a name which starts from test and then anything after that right and then it
will take it Okay So this is the use of this restrict project naming So in case you want
to restrict your Jenkins, Project naming so that people use some default naming conventions
we can use this option as of now I am putting it back to default The next option is global
properties Okay now global properties as the name suggests We can Define some Global Properties
or the properties at a global level, which can be used by all the jobs in Jenkins So,
for example, we can add some variable Let us say I add some key and some value now this
let us say this is given its value is 1 okay now after I add this this Available for all
the jobs in a Jenkins and I can refer this value by this key so I can refer this like
this dollar key one Okay, or we can also say dollar key one Okay Now do not get intimidated
with all the information I am giving it to you right now This is a just a basic understanding
of different configuration options. I will cover all these in details and into
deeper insights in my coming sessions Okay So as of now, let me delete it Okay, again,
you can give some two locations which you want should be at a global level and can be
accessed by any job Okay And now the next option is Jenkins location So normally we
start our Jenkins if you are on the local machine, we say localhost 8080, but you can
also instead of localhost you can get the IP of your machine So in case if you have
noticed today instead of starting on localhost, I am giving the IP of my machine so you can
get the IP of your machine by going to command prompt on Windows and typing ipconfig or if
you are on a Mac you can go to command you can go to terminal and type ipconfig, or you
can also go to your network preferences and get your IP from there in the same You can
put it here So if I can put my IP here Okay, and so on you can put some of your admin email
address here. Okay, the SSH server So in case you want your
Jenkins to run a job remotely and connect to some server you can give the port numbers
here and we will cover this in to details in the coming sections And the last option
is shell So by default Jenkins has a bash shell on which it executes all the shell commands,
but in case you want to Some dude directory or some other shelf example, you have configured
cygwin on your system And you want that all the executable command should be executed
on the cygwin You can give the location of the executable here For example, if you are
on Windows and in Windows, it is cmd.exe where the commands get executed So by default it
will take the location of your Cmd.exe in case you have changed the location you can
provide it here so that Jenkins know that from where I have to execute the executable
command commands Okay So this is all about the very basic configurations of Jenkins and
please do not get intimidated by all the information I have provided you in this sessions We will
cover all these configurations and settings into deeper details as we go through the jobs
and others Settings in the coming series Okay So hope you like it Thank you.(for watching.)