Creating And Configuring Freestyle Projects In Jenkins
Last Updated :
27 Feb, 2024
Jenkins freestyle project is the general purpose job that will clone the projects from the Source Code Management (SCM) like Github, Gitlab, and Bit Bucket. After according to the configurations done to the project it will execute the steps in a series of manner like archiving the artifacts and sending the email notifications etc.
What is Jenkins Freestyle Project?
In Jenkins Freestyle project is a basic and simple way to create and build the jobs of any type of application. Jenkins freestyle project will support many automation tasks because of its flexibility of use. In the term itself, it is freestyle which means the configuration of the project is very simple it is less structured and more flexible to use when compared to the other projects in Jenkins.
Types Of Projects Available in Jenkins
In Jenkins three are mainly used projects
- Freestyle project
- Pipeline project
- Multiconfiguration Project
1. Freestyle Project
It is the most used project because of its structure which is simpler than complicated. For this project there is no need for any scripting language or no need of coding skills by using the console itself self you can do all the configurations needed for the project which will save lots of time and effort for the employees.
2. Pipeline Project
DevOps professionals mostly work with pipelines because pipelines can automate processes like building, testing, and deploying the application. Doing it manually by UI takes lots of time and effort which will affect productivity. With the help of Continuous Integration / Continuous Deployment (CI/CD) Pipeline scripts we can automate the whole process which will increase productivity and save lots of time for the organization and can deliver quality applications to the end users.
Read - How to Make a CI-CD Pipeline in Jenkins?
3. Multiconfiguration Project
In Jenkins, a Multiconfiguration Project—also called a Matrix Project—is a project type that enables you to execute a build or series of concurrent builds on several configurations or axes. When you need to test your software or run builds across several platforms, environments, or settings, this kind of project is quite helpful.
Step-by-step Process To Setup Jenkins FreeStyle Project
Step 1: Access Jenkins from the internet and log in by using the credentials as shown below.
.webp)
Step 2: Give the name of the project and slect the freestyle project as show in the image below. Ans click on ok after selecting.
.webp)
Step 3: Know one page will open as show in the image below where you need to configure all the required configurations required for the project which you want to build.
.webp)
In this page you need to configure all the details required for the project to build and deploy the application.
Step 4: While configuring the freestyle project you need to give the credentials and repository URL so that jenkins can clone the source code from your github. In the place of repository URL paste your github url and in the place of credentials click on the add credentials and follow the proceses shown in the step 5.
.webp)
Step 5: After clicking on the +Add option a pop up will open in that pop up select the kind as "username with password" in the place of the user name give the name you wnat and in the place of password give the "ssh key" from the github.
.webp)
Step 6: Select the branch from which you want to clone the source code.
.webp)
Step 6: In this project i was going to show how to build the maven project. So under the build section select the "Invoke top-level Maven Targets". In that configure the maven version you have been configured in the jenkins pulgin in section here i have configured maven3.8.6 so i was giving that.
In the goal section give the goals here the goal was to build the package so use the maven command
clean package
No need of giving the "mvn" here in jenkins.
.webp)
Step 7: Save the configuration and click on apply you will automatically redirecrted to the build page there click on the build know option.
.webp)
Step 8: Click on the job which is running where it will redirect to the console output you can see the status and the logs of the build.
.webp)
Step 9: Scroll down fully to see the status of the job where the jobs show sucess as shown below it is succed or if any errors occurs it will shows you in the same console output its slef do the debuging accordingly.
.webp)
For me the build was success after doing it two to three times and reading console output and changing configurations accordingly. So read the console output properly it will give you the solution also.
People Also Read
- How To Install Jenkins - Read
- How To Write Jnekins CI/CD pipeline - Read
Conclusion
In this article we have jenkins to pull the source code and build the mave appliction by using the freestyle project. Freestyle project is the basic project whihc is regularly used in the jenkinsfor any type of project dependinf up on the need you can choose the different projects.
Similar Reads
How to Configure a Maven Project in Jenkins ?
Jenkins is a powerful automation server broadly utilized in software development for continuous integration (CI) and continuous delivery (CD) processes, it empowers developers to automate different parts of the product advancement lifecycle, including building, testing, and deploying applications, o
8 min read
How to Configure and Integrate Maven in Jenkins?
Maven integration with Jenkins makes Java project development and deployment easier. Step-by-step instructions for integrating Maven with Jenkins are provided in this guide. You will discover how to set up Jenkins for Maven, manage project dependencies, automate builds, and enhance software delivery
5 min read
How To Configure Build Periodically In Jenkins?
Jenkin has now become a very popular open-source automation server used for building, testing, and deploying software. It has several key features, one of which is that it can schedule periodically in Jenkins. In this article, we are going to explore in depth how we can configure builds periodically
5 min read
Managing Git Configurations Across Multiple Projects
Git allows you to track changes, collaborate with others, and manage project versions efficiently. However, managing Git configurations across multiple projects can be challenging, especially when different projects require different settings. In this article, we will see the strategies and best pra
3 min read
Installing and configuring Jenkins on Arch-based Linux Distributions (Manjaro)
Jenkins is an open-source, cross-platform automation server that is used to build, test and deploy software. It simplifies and accelerates Continuous Integration/Continuous Delivery (CI/CD) environments by creating jobs, scripts, and pipelines. The application is primarily written in Java and requir
2 min read
Jenkins Master And Slave Configuration Using AWS EC2 Instance
Optimizing the jenkins performance enhances the scalability by configuring the master-slave architecture using AWS EC2 Instances. Distributed workloads efficiently secures seamless CI/CD process for your projects. In this Article you will guide how to configure jenkins master-slave nodes using AWS E
5 min read
How to install and configure Jenkins Server on Godaddy Srever?
GoDaddy Server is a cloud-based hosting platform that consists of virtual and dedicated servers. The premium service includes weekly backups, 99% uptime, 24x7 Customer Support, a free encrypted SSL certificate, unlimited bandwidth, and SSD storage. For regular users, the latest generation is VPS Gen
3 min read
How to Build Angular Application in jenkins ?
Jenkins is a popular tool for Continuous Integration. Using Jenkins, we can externalize the build process for our code. It allows teams to collaborate more efficiently and deliver software in shorter cycles. In this article, we will learn how to build an angular app in Jenkins. Pre-RequisitesClone t
6 min read
What Is Poll SCM Jenkins ?, And How To Configure Poll Scm ?
Jenkins is one of the most popular open-source automation servers that provides an interface for building, testing, and deploying code. One of its essential key features is that it can trigger builds automatically based on the changes made in the source code repository. This process is known as poll
6 min read
Jenkins and GIT Integration using SSH Key
Integrating Jenkins with Git using SSH keys is a powerful way to automate your Continuous Integration (CI) and Continuous Deployment (CD) pipelines while ensuring secure access to your Git repositories. In this article, we'll guide you through the process of setting up Jenkins to work seamlessly wit
3 min read