Creating Freestyle job in Jenkins

Creating Freestyle job in Jenkins

Introduction:

Jenkins is a powerful automation server that enables continuous integration and continuous delivery (CI/CD) workflows. One of the fundamental building blocks in Jenkins is the concept of jobs, which are units of work that automate various tasks in your software development process. In this tutorial, we will learn about the process of creating a freestyle job in Jenkins

What is Jenkins Freestyle Project?

A Jenkins Freestyle project is a repeatable build job, script, or pipeline that consists of steps and post-build actions. It is a better function or function that can accomplish multiple tasks. It allows you to configure build triggers and provides project-based security for your Jenkins project. It also offers plugins to help you create steps and post-build actions.

The types of actions you can perform in the Jenkins build phase or post-build action are quite limited. There are several standard plugins available in Jenkins Freestyle projects to help you overcome this problem.

Creating Freestyle job in Jenkins

How to Set up a Build Job in Jenkins

Step 1: Create a New Freestyle Project

1. Click the New Item link on the left-hand side of the Jenkins dashboard.

Creating Freestyle job in Jenkins
Read Also-DevOps Full Course

Step 2. Enter Item details

  1. Enter the name of the item you want to create. We shall use the “My Freestyle project” for this demo.
  2. Select Freestyle project
  3. Click Okay
Creating Freestyle job in Jenkins

3.Under the General tab, add a project description in the Description field.

Creating Freestyle job in Jenkins

Step 2: Add a Build Step

1. Scroll down to the Build section.

2. Open the Add build step drop-down menu and select Execute shell.

Creating Freestyle job in Jenkins

3. Enter the commands you want to execute in the command fields. For this tutorial, we are using a simple set of commands that displays the current version of Java and the Jenkins working directory:

java -version


4. Click the Save button to save changes to the project.

Creating Freestyle job in Jenkins

Step 3: Build the Project

1. Click the Build Now on the left-hand side of the new project page.

Creating Freestyle job in Jenkins

2. Click the link to the latest project build in the Build History section.

Creating Freestyle job in Jenkins

3. Click the Console Output link on the left-hand side to display the output for the commands you entered.

Creating Freestyle job in Jenkins

4. The console output indicates that Jenkins is executing the command successfully, displaying the current version of Java and the Jenkins working directory.

Creating Freestyle job in Jenkins
Covered all job related part in this video..
Mahesh Wabale
Latest posts by Mahesh Wabale (see all)

Leave a Comment