This article is all about configuring and installing freestyle project using Jenkins. This guide will also provide instructions to set up Jenkins and Java as well.
Jenkins is one of the most popular tools for continuous integration and continuous Delivery on any platform and It’s a self-contained, open-source automation tool written in java. It also provides hundreds of plugins to support building, deploying and automating any project and also supports version control tools like Subversion , Git, Mercurial, and Maven and allows for faster delivery of Software by working with a large number of deployment and testing technologies.
What is freestyle project?
A Jenkins project is a repeatable build job which contains step and post-build actions. The types of actions you can perform in a build step or post-build action are quite limited. There are many standard plugins available within a Jenkins freestyle project to help you overcome this problem. In the other words , They allow you to configure build triggers and offer project-based security for your Jenkins project.
Let’s try and set up freestyle projects using Jenkins. but you need to first ensure that java is installed in your system. To install java follow this steps:
- Install java 8 Open JDK package.
sudo apt-get install openjdk-8-jdk
- install Jenkins:-
- verify package is downloaded
Creating your first Jenkins Freestyle pipeline
STEP-1: open Jenkins using http://localhost:8080
STEP-2: copy the password from the terminal and click on continue.
STEP-3: once installation done, login with username and password .
STEP-4: Click on “ New Item ” at the top left-hand side of your dashboard and Select “Freestyle Project“.
Here’s what the menu looks like:
STEP-5: Now, set your configuration after that click on Apply & save and then click on ” Build Now ” to execute the test.
If you want to learn the configuration process in detail, you can explore here.
Setting up the build.
Now that we’ve set up a freestyle project, let’s set up our build environment . Follow these steps:
1 The configuration page will take you to the following page:
2. Select Build Now on the left navigation menu to run the build.
3. Open the console output to view the logs of our build. This log will tell you what happened when your code was being pulled, and if the build was an issue , this is the quickest way to identify it.
The purpose of the Freestyle project is to implement , develop or run simple jobs like allowing you to specify the version control system from which you are required to extract code and build it and call tests if available. Therefore Freestyle projects are meant to orchestrate simple jobs for a project.
I hope that you may have found this useful. Thanks.