Installation of Jenkins and execution of a job

Go to the download website for Jenkins: jenkins.io/download And download the binaries for Jenkins for Windows

1stblog_a.jpg

The download to produce a file named jenkins.war Use this file to run Jenkins.

istblog_b.jpg

Open the command prompt. Traverse to the directory containing the jenkins.war file Type the command : java -jar jenkins.war

1stblog_c.jpg

The command takes some to run. Open the web browser. Go to localhost:8080 -> This is the port on which Jenkins run You would be prompted to input the administrator’s password and create a new user. Log in into the Jenkins dashboard

1stblog_d.jpg

The Dashboard for Jenkins should look something like that:

1stblog_e.jpg

You will have to add the JDK installations and Maven installations to maven. Go to manage Jenkins option Go to global tool configuration In the Java JDK section name the JDK and add the location of JAVA_HOME

1stblog_f.jpg

In the Maven Section Add maven name and MAVEN_HOME location Save and apply the changes

1stblog_g.jpg

Go to Manage Jenkins again Select the manage plugins option Search maven plugin in the available plugins. Install the plugin

1stblog_h.jpg

Go to Manage Jenkins again Select the manage plugins option Search maven plugin in the available plugins. Install the plugin

1stblog_i.jpg

Specify a maven project to Jenkins Specify the location of pom.xml location. Specify the project directory And apply the changes. The created pipeline should look similar to one shown below:

1stblog_j.jpg

Click on Build now and check the console output for the project

1stblog_k.jpg

The project should build successfully and return “BUILD SUCCESSFUL”, if no errors were found.

1stblog_l.jpg