Javatpoint Logo
Javatpoint Logo

Jenkins Configuration

To configure the Jenkins, click on the 'Manage Jenkins' menu option from the left-hand side of the Jenkins Dashboard screen.

Jenkins Configuration

On the Manage Jenkins page, you will see the following options:

Jenkins Configuration Jenkins Configuration

Configure System

Click on the 'Configure System'.

Jenkins Configuration

The configure system page is a critical configuration part. This screen represents a variety of sections, each correlating to a different configuration area from generic Jenkins settings, global environment variables, and most installed plugins are configured on this page.

Home directory

Jenkins requires some disk space to perform builds and keep archives. You can check this location from the configuration screen of Jenkins.

By default, this is set to ~/.jenkins, and this location will be initially stored within your user profile (such as C:\Users\Nikita\.jenkins) location.

Jenkins Configuration

You can change this location to a different location to store all relevant builds and archives. We can do this in the following ways:

  • Set environment variable of JENKINS_HOME to the new home directory before launching the servlet container.
  • Set system property of JENKINS_HOME to the servlet container.
  • Set JNDI (Java Naming and Directory Interface) environment entry JENKINS_HOME to the new directory.

Let's see to set the JENKINS_HOME environment variable.

First, create a new folder in any directory. And copy all the contents from the ~/.jenkins to a new folder.

Set the JENKINS_HOME environment variable to the newly created folder, which is also pointing to the base directory location where Java is installed on your machine.

Now, in the Jenkins dashboard, click on the Manage Jenkins from the left-hand side menu, and then click on the Configure System from the right-hand side.

In the Home directory option, you will now see the directory which has been configured.

# of executors

This option refers to the total number of concurrent job executions that can take place on the Jenkins machine. This can be changed based on the requirements. I recommended to you to keep this number same as the number of CPU on the systems for better performance.

Jenkins Configuration

Environment Variables

This option is used to add custom environment variables which will apply to all the jobs. Environment variables are key-value pairs and can be accessed and used in Builds wherever required. (For example: SLACK_TOKEN, SAUCE_API_KEY ).

Jenkins Configuration

Jenkins URL

By default, the Jenkins URL is set to the localhost. If you have a DNS (domain name setup) for your machine, set this to the domain name else overwrite localhost with the IP of machine. This will help in setting up slaves (nodes) and while sending out links using the email as you can directly access the Jenkins URL using the environment variable JENKINS_URL which can be accessed as ${JENKINS_URL}.

Jenkins Configuration

Email Notification

In the Email Notification section, you can configure the SMTP settings for sending out emails. This needs for Jenkins to connect to the SMTP mail server and send out emails to the recipient list.

Jenkins Configuration




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA