Jenkins – An Automated Server

Jenkins is the leading open-source continuous integration tool developed by Hudson lab.It is cross-platform and can be used on Windows, Linux, Mac OS and Solaris environments.Jenkins is written in Java.

Important Features of Jenkins

  • Change Support: Jenkins generates the list of all changes done in repositories like SVN,GIT.

  • Permanent links: Jenkins provides direct links to the latest build or failed build that can be used for easy communication

  • Installation: Jenkins is easy to install either using direct installation file (exe) or war file to deploy using application server and easy configuration.

  • Email Integration: Jenkins can be configured to email the content of the status of the build.

  • Multiple VMs: Jenkins can be configured to distribute the build on multiple machines.

  • Project build: Jenkins documents the details of jar, version of jar and mapping of build and jar numbers.

  • Plugins: 3rd party plugin can be configured in Jenkins to use features and additional functionality.

Installation and Setup Of Jenkins (In Ubuntu OS)

Step 1 -Installing Jenkins

The version of Jenkins included with the default Ubuntu packages is often behind the latest available version from the project itself. In order to take advantage of the latest fixes and features, we’ll use the project-maintained packages to install Jenkins.

First, we’ll add the repository key to the system.

$ wget -q -O - | sudo apt-key add -

When the key is added, the system will return OK. Next, we’ll append the Debian package repository address to the server’s sources.list.

$ echo deb binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list

When both of these are in place, we’ll run update so that apt -get will use the new repository:

$ sudo apt-get update
Finally, we'll install Jnekins and its dependencies, including Java:

$ sudo apt-get install jenkins

Now that Jenkins and its dependencies are in place, we’ll start the Jenkins server.

Step 2 -Starting Jenkins

Using systemctl we’ll start Jenkins:

$ sudo systemctl start jenkins

Since systemctl doesn’t display output, we’ll use its status command to verify that it started successfully

$ sudo systemctl status jenkins

If everything is OK, you should receive an output similar to the following

jenkins.service - LSB: Start Jenkins at boot tim
Loaded: loaded (/etc/init.d/jenkins; bad; vendor preset: enabled)
Active:active (exited) since Thu 2017-04-20 16:51:13 UTC; 2min 7s ago
Docs: man:systemd-sysv-generator(8)

Jenkins by default is listening on port 8080 , so open your favourite web browser and navigate it to http://IP_ADDRESS:8080 to access Jenkins.The first screen will prompt you to enter and administrative password. For security reasons Jenkins creates this password and stores it to the log file i.e ‘var/lib/jenkins/secrets/initialAdminPassword’ file.

In the terminal window, we’ll use the cat command to display the password:


Run the following command to show the password

$ sudo cat /var/lib/jenkins/secrets/initialAdminPassword

We’ll copy the 32-character alphanumeric password from the terminal and paste it into the “Administrator password” field, then click “Continue”. The next screen presents the option of installing suggested plugins or selecting specific plugins.


We’ll click the “Install suggested plugins” option, which will immediately begin the installation process:

When the installation is complete, we’ll be prompted to set up the first administrative user. It’s


possible to skip this step and continue as admin using the initial password we used above, but we’ll take a moment to create the user.


Once the first admin user is in place, you should see a “Jenkins is ready!” confirmation screen.

Thats it…..done!!