Setup Jenkins in MacOS and Build your first Jenkins job.

MONIKA RAJPUT
4 min readDec 6, 2022

What is Jenkins?

Jenkins is an open source automation server. It helps automate the parts of software development related to building, testing, and deploying, facilitating continuous integration and continuous delivery.

It’s an automation server used to build and deliver software projects.

Benefits of using Jenkins

A major benefit of using Jenkins is that it has a lot of plugins available. There is easier to use CI software available, but Jenkins is open-source, free, and it is still very popular.

Why we use Jenkins for CI/CD?

Jenkins can really help you to release software in short cycles and then ensure its reliability because we are going to test and build the software over and over again. In practice, CI and CD means that we are going to verify and publish work by triggering automated builds and tests. And Jenkins is a tool that we can use for that. We are going to do these automated builds and tests.

Installation of Jenkins.

Prerequisites: Install Homebrew

Homebrew is a package manager for MacOS. It allows you to install all sorts of useful tools. To install it, follow the simple instructions here.

Step 1 : Install Jenkins via homebrew.

brew install jenkins-lts

Start the Jenkins Service.

brew services start jenkins-lts

Jenking will listen on — httpListenAddress=127.0.0.1 — httpPort=8080

Step 2: Run Jenkins on Localhost.

Open http://127.0.0.1:8080

Step 3: Login into Jenkins Dashboard.

You can find the password in this file /Users/monika/.jenkins/secrets/initialAdminPassword

Open it via nano /Users/monika/.jenkins/secrets/initialAdminPassword and copy the password.

Click on continue. It will start downloading required packages.

It will take 15 minutes to download all the required packages.

Step 4 : Add Username , Password, Full Name and E-mail Address then save and Continue. Now your Jenkins is ready to work.

The Jenkins Dashboard will look like below screenshot.

Step 5: Build your first Job.

we’re going to create our first app, it’s not going to be a huge app. It is going to be pretty simple because it’s our first job.

So to create a job, we can click on Create a job.

Enter the name of the Job, Here’s the name is my-first-job. We’re going to click on the Freestyle project, which is a simple project, and then click, OK.

Add Description and skip all the details.

In Build Steps options choose Execute shell option.

In shell add echo welcome to the world Jenkins and Save it. So let’s click on Save.

Now, the mute button means Veldon appropriate.

And after we save, Just Click on Build now and it will generate #1. You need to click on #1.

To see the output click on Console Output.

You are successfully able to create your first job.

--

--