Jenkins: How to Create Builds with the Jenkins Freestyle Project

Sunday, January 26, 2020

Jenkins: How to Create Builds with the Jenkins Freestyle Project



A Jenkins project is a repeatable build which contains steps and post build actions. The type of action you can perform beginning of build step or post build action. There are many standard plugin are available with in a Jenkins free style project to help you to overcome your problem.

Jenkins-create-build-free-style-project.png
Jenkins create & build free style project
  


1. Free Style Project in Jenkins

 A Jenkins project is contains steps and post build actions. The type of action we can perform in order to build step, post-build action or Jenkins pipeline. There are tons of standard plugin available in Jenkins to overcome our problem.  

2. Jenkins -  Creating Free Style build Job

  For Creating the Jenkins free style job, we have to login to our Jenkins Dashboard. If it is hosted locally please visit http://localhost:8080 If you hosted some the URL visit over there. 

Step - 1

    Click on the new Item, top left corner of your dashboard - 

Jenkins NewItem
Jenkins NewItem
Step - 2

Enter the name of the item, choose freestyle project and click on ok.

Freestyle Project
Freestyle Project
Step - 3

Enter the details of the project you want to set. 

Jenkins Project Details
Jenkins Project Details

Step - 4

Under the source code management please enter your repo URL. In order to clone your repository and run it. Your url can be - https://github.com/kriru/firstJava.git

Jenkins Setup Git Project
Jenkins Setup Git Project

Step - 5

Next click on Add build step - > Execute Windows batch command and add the command you want to execute, Our case -  

javac HelloWorld.java
java HelloWorld

Jenkins Build Windows Batch Command
Jenkins Build Windows Batch Command

Step - 6

 After that click on apply & Save - > Build now, in order to check whether the build is successful or not. 

Jenkins Build Now
Jenkins Build Now


Jenkins Build Successful
Jenkins Build Successful


Step - 7

    If you want to explore it more you can click on console output to see the details result. 

Jenkins console output
Jenkins console output



Congratulations,  we have executed our HelloWorld program from Jenkins. 


More Details you can see my below video link - 



0 comments :