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.
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.
Read Also-DevOps Full Course
Step 2. Enter Item details
- Enter the name of the item you want to create. We shall use the “My Freestyle project” for this demo.
- Select Freestyle project
- Click Okay
3.Under the General tab, add a project description in the Description field.
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.
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.
Step 3: Build the Project
1. Click the Build Now on the left-hand side of the new project page.
2. Click the link to the latest project build in the Build History section.
3. Click the Console Output link on the left-hand side to display the output for the commands you entered.
4. The console output indicates that Jenkins is executing the command successfully, displaying the current version of Java and the Jenkins working directory.
- AnchorSetup using Docker-Compose - October 18, 2024
- Devops assignment - October 17, 2024
- Deployment of vault HA using MySQL - September 18, 2024