Jenkins: Create a freestyle job

This guide will show you how to set up your first freestyle job in Jenkins. You will use Jenkins to download Java source code from GitHub, compile the code using Maven, and view the build output.

What is a Jenkins freestyle job?

A Jenkins freestyle job is the most flexible type of job that you can do. A Freestyle job allows you to build any project. For example, you can do a Maven build, run a script, and so much more. Jenkins provides the freestyle job option by default without the need to install more plugins.

Let’s create a freestyle job!

First, create a new Freestyle job. You can do this by clicking: Jenkins -> New Item.

Next, enter a name for your Freestyle job and choose the “Freestyle Project” option.

Finally, this will take you to the configuration page for the new Freestyle job you have just created.

Next in the “Source Code Management” section:

Next in the “Build Environment” section:

  • Tick the “Add timestamps to the Console Output” option.

Next, in the “Build” section, click the “Add build step” button.

Finally, add “Invoke top-level Maven targets” and specify “package” as the goal.

Now click the “save” button. You will now see the dashboard for this job.

Run your freestyle job

You can run your freestyle job by clicking on the “build now” button in the job’s dashboard.

Jenkins will then display the build history below.

View the job’s console logs

You can then click on the build history job number (#1 – in this case) to view more information about the specific job that ran.

Next, click the console output option to see the job log.

View the job’s output files

Next, click the “workspace” button to view the files created by this job.

You can then download the files if needed:

Wrapping up

You can do a lot more in a job. For example, you could add post-build triggers to do coverage or archive the build. The possibilities are endless. But, you now know how to set up a Jenkins freestyle job.

You may also be interested in



About the Authors

Anto's editorial team loves the cloud as much as you! Each member of Anto's editorial team is a Cloud expert in their own right. Anto Online takes great pride in helping fellow Cloud enthusiasts. Let us know if you have an excellent idea for the next topic! Contact Anto Online if you want to contribute.

Support the Cause

Support Anto Online and buy us a coffee. Anything is possible with coffee and code.

Buy me a coffee



About Anto Online

Having started his career in 1999 as a Desktop Support Engineer, Anto soon changed paths and became a developer. After several years of development experience, he transitioned into a consultant. As an enterprise application consultant for a leading SaaS software provider, Anto specializes in AWS's serverless technologies. By day, Anto focuses on helping customers leverage the power of serverless technologies. By night, he indulges his passion for cloud computing by playing with Python and trying out things that are currently beyond the scope of his work. Sometimes Anto needs help as there are not enough hours at night. So Anto relies on a team of fellow Cloud enthusiasts to help him out. Each one is a Cloud expert in their own right, and Anto takes great pride in helping them learn and grow.

View all posts by Anto Online →

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.