How to Configure Jenkins Build Server
In the previous chapter, we studied the on the details about what is Jenkins, its usage and best practices to be made while working with Jenkins. Now, let us see configuring Jenkins in our local machines.
Note : The below steps shows how to install and configure Jenkins a windows environment and using Apache Tomcat web server.
Jenkins Setup
- Download the latest Jenkins.war from https://jenkins-ci.org/. Towards the right top click on the link latest and greatest to download the latest war file.
- Deploy the Jenkins.war file in the local web server of our machine. E.g. Tomcat
- Start the server and open the browser and hit the URL http://localhost:8080/jenkins
- Click on the create new jobs link to configure a project for build automation. Enter the details of the project as shown below and click OK.
- In the next page, fill all the required details like - description, path of the project's pom.xml and other details and click save.
- A project/job is created in Jenkins. As shown below:
- Click on the Build now option as shown above. This will read the pom.xml and pull out the latest code and executes a build process and generates the jar/war file accordingly.
- Click on the build number link and it opens up the build details. Click on the console output to see the logs of the build.