# Getting Started with Jenkins | Day 22 of 90 Days of DevOps

Hello, everyone!

I am back with another blog post on my DevOps learning journey with 90DaysOfDevops. Today, I will introduce you to Jenkins, a popular tool for automation and continuous integration and delivery. I will also show you how to create a simple freestyle pipeline that prints Hello World using Jenkins.

## What is Jenkins?

Jenkins is an open-source automation server written in Java that helps build, test, and deploy software. It works or runs on Java as it is written in Java. By using Jenkins, we can make a continuous integration of projects (jobs) or end-to-end automation.

Jenkins supports various version control tools such as Git, SVN, CVS, etc., and can execute different types of projects such as Ant, Maven, Gradle, etc. as well as arbitrary shell scripts and Windows batch commands.

Jenkins also provides many plugins that extend its functionality and allow us to customize our pipelines according to our needs.

Jenkins has two main components:

* **Jenkins master**: The main server that manages the configuration and scheduling of the jobs and communicates with the agents.
    
* **Jenkins agent**: The node that executes the tasks assigned by the master and reports the status back to the master.
    

Jenkins uses a web-based interface that allows us to create, configure, monitor, and manage our jobs and pipelines.

## How to Create a Simple Freestyle Pipeline in Jenkins?

A freestyle pipeline is a type of build job in Jenkins that allows us to configure any build job using a graphical user interface. It is flexible and easy to use for beginners.

To create a simple freestyle pipeline that prints Hello World in Jenkins, follow these steps:

1. Go to your Jenkins dashboard and click on **New Item**.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692100277357/70f32a09-c8ab-4e77-a366-8c6a57e98a03.png align="center")
    
2. Enter a name for your pipeline (e.g., Hello World) and select **Freestyle project**. Then click **OK**.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692100262510/6d8858d5-432f-4970-82fc-1a999a7513c7.png align="center")
    
3. On the configuration page, you can add some description for your pipeline if you want.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692100234844/59042132-bdc1-445a-9b31-d75ef99891d2.png align="center")
    
4. Under **Source Code Management**, select **None** since we are not using any version control tool for this pipeline.
    
5. Under **Build Triggers**, you can choose when you want your pipeline to run automatically. For example, you can select **Build periodically** and enter a cron expression (e.g., `* * * * *`) to run your pipeline every minute. For this example, we will leave this section blank and run our pipeline manually.
    
6. Under **Build**, click on **Add build step** and select **Execute shell** (or **Execute Windows batch command** if you are using Windows). This will allow us to run any shell or batch command as part of our pipeline.
    
7. In the text area that appears, enter the command `echo "Hello World"` and click **Save**.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692100189595/e2b1fc8d-9ad7-40a0-b5c9-2816e5f4589c.png align="center")
    
8. Now, go back to your Jenkins dashboard and click on your pipeline name (e.g., Hello World). Then click on **Build Now** to run your pipeline.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692100177274/e2d1f67a-68fa-446c-a793-6e828c2d536e.png align="center")
    
9. You will see a new build number appear under **Build History** with a blue ball indicating that the build is in progress. You can click on it to see the details of the build.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692100142570/f162d205-9260-4150-91a1-89d40a429d11.png align="center")
    
10. Click on **Console Output** to see the logs of the build. You should see something like this:
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692100157814/5709cf38-d7bf-4f5b-b3b0-f686be911d2c.png align="center")
    

Congratulations! You have successfully created and run a simple freestyle pipeline that prints Hello World in Jenkins.

I hope this blog post helps you understand the basics of Jenkins and how to create a simple freestyle pipeline.

In the next blog post, I will show you how to create more complex pipelines using different types of projects and plugins.

If you have any questions or feedback, please feel free to contact me on:

* GitHub: [https://github.com/ajitfawade](https://github.com/ajitfawade)
    
* LinkedIn: [https://www.linkedin.com/in/ajitfawade/](https://www.linkedin.com/in/ajitfawade/)
    

Thank you for reading! 😊
