Jenkins

Jenkins – Configuration

Jenkins – Configuration

In Jenkins, there are several configuration options. They can be accessed by clicking the ‘Manage Jenkins’ option on the left hand side menu.

The below screen will follow −

Jenkins Home Directory

Jenkins requires disc space to run builds and store archives. This location can be checked from the Jenkins settings screen. This is set to /.jenkins by default, and this location is saved initially within your user profile location. This location should be changed to a suitable location for storing all relevant builds and archives in an appropriate environment. Know how this can be accomplished in this Jenkins Tutorial in the following ways:

  • Before launching the servlet container, SET the "JENKINS HOME" environment variable to the new home directory.
  • Assign the servlet container the system attribute "JENKINS HOME."
  • SET the JNDI environment variable "JENKINS HOME" to the new directory.

The first option, setting the "JENKINS HOME" environment variable, is used in the following example.

Make a new folder called E:AppsJenkins. Copy the contents of the previous /.jenkins directory to this new directory.

Set the JENKINS HOME environment variable to the root directory location on your m

achine where Java is installed. As an example,

 

In Jenkins, there are several configuration options. They can be accessed by clicking the ‘Manage Jenkins’ option on the left hand side menu.

The below screen will follow −

Select Configure system. Some of the Jenkins configuration settings that can be carried out are discussed below.

Jenkins Home Directory

Jenkins requires disc space to run builds and store archives. This location can be checked from the Jenkins settings screen. This is set to /.jenkins by default, and this location is saved initially within your user profile location. This location should be changed to a suitable location for storing all relevant builds and archives in an appropriate environment. Know how this can be accomplished in this Jenkins Tutorial in the following ways:

  • Before launching the servlet container, SET the "JENKINS HOME" environment variable to the new home directory.
  • Assign the servlet container the system attribute "JENKINS HOME."
  • SET the JNDI environment variable "JENKINS HOME" to the new directory.

The first option, setting the "JENKINS HOME" environment variable, is used in the following example.

Make a new folder called E:AppsJenkins. Copy the contents of the previous /.jenkins directory to this new directory.

Set the JENKINS HOME environment variable to the root directory location on your m

achine where Java is installed. As an example,

 

From the Jenkins dashboard's left-hand menu, select Manage Jenkins. Then, on the right, click on 'Configure System.'

You will now see the newly configured directory in the Home directory.

# of executors

This is the maximum number of concurrent task executions that can occur on the Jenkins machine. This can be adjusted based on the situation. It is sometimes recommended to maintain this value the same number of CPUs on the machine for optimum performance.

Environment Variables

This is used to define custom environment variables that will be applied to all jobs. These are key-value pairs that can be retrieved and utilised in Builds as needed.

Jenkins URL

The Jenkins URL is set to localhost by default. If you have a domain name configured for your system, set this to the domain name; otherwise, overwrite localhost with the machine's IP address. This is useful when configuring slaves and delivering links through email because you can directly access the Jenkins URL using the variable JENKINS URL, which can be accessed as ${JENKINS URL}.

Email Notification

You may configure the SMTP settings for sending emails under the email Notification box. Jenkins needs this to connect to the SMTP mail server and send emails to the recipient list.