Jenkins — Introduction, and Getting Started with Jenkins (Part 1)

This will be a tutorial series of Jenkins and we will start from the very basics of Jenkins and go to the deep points. First, we will discuss What is Jenkins and How to use it. Then later on we will discuss Jobs in Jenkins and the plugins that we can use for Jenkins and so on. Later we will discuss how to do continuous integration with Jenkins.

Jenkins is a Java application. Because it is a Java application it is platform-independent and it does not require any specific platform. You do not have to worry about the operating system that you are using. Jenkins uses for continuous integration and continuous delivery. So what are continuous integrations and continuous delivery?

Jenkins workflow

When we are working with a team we have different developers who develop the code make changes to the code. As the developer works on his own machine, he will check in the code to some shared repository which can be Git, BitBucket, or TFS. Now what happens is let's suppose through the entire day many developers who are changing the code and checking the code in a shared repository. At the end of the day when you have a build let’s suppose there is some bug in the code and now the build failed. Now it will be very difficult to identify what exact code failed the build and to what point this happens. Then you have to go back and checking the code that was created that day and there will be a lot of confusion.

So here comes Jenkins. What Jenkins does is as soon as any developer comes with the code to the shared repository Jenkins will take that latest code and trigger a build. And the build notification will be sent out. So as soon as you will get a notification if the build failed or build success. So that we can check that if there is an issue due to any commit. So that we can save our effort without wasting time to find the bugs. We can also integrate our UnitTest, Acceptance Test, or Performance Test along with the build as a post-build action in Jenkins. As soon as the build gets deployed Jenkins will trigger some test cases or some testing which will be automated and it will send a report back to us.

Let’s suppose the build is successful there was no exception. But due to the changes in the code, there was something that broke in the application. So we will come to know instantly that there is some break in the code and we can troubleshoot it.

So you can see how efficient and powerful the entire system can be and this is we called Continuous Integration.

Jenkins takes the code and builds the code as soon as commit. After that Jenkins triggering the Tests and sending back the report. As soon as there is any change in the code, this cycle will execute. So this is how Jenkins fits into the picture.

Use this link to download Jenkins to your machine.

As soon as you go to this download page you can see two options.

I would prefer to take a long-term support release. Just download the LTS option.

I am using a Windows operating system and here are the steps to install Jenkins for Windows operating system. Now here you can see the downloaded folder.

Extract it and go inside the extracted folder and run it.

Click the Next button and Finish the installation.

Once the installation success the Jenkins server will up and running. You can access it from the browser in default port 8080.

After this Jenkins will ask for you a password. For the first time, Jenkins will ask for the Admin password. It will show the file location where the password located.

Just copy-paste that password and click Continue.

As soon as you enter the password it will ask for install the plugins. You have 2 options,

  • Install suggested plugins
  • Selected plugins to install

We need to select plugins by ourselves. So click Selected plugins to install.

Here you can see all the plugins and the green ones are already selected plugins. You can just select the plugins by All, None, and Suggested options on the top of the screen. Otherwise, you can browse plugins by the category of plugins on the left side panel. Select plugins that you want and just click the Install button.

After the plugins installed you will get this screen.

Here you can create any user or you can continue as Admin. I am going to choose Continue as Admin option.

Now it will start my Jenkins initial screen.

So this is all about starting Jenkins. In the next tutorial, we will start creating jobs in Jenkins.

Thank You!

Software Engineer at IFS R & D International (Pvt) Ltd || Former Software Engineer at Pearson Lanka || Former Associate Software Engineer at hSenid Mobile