How to create your first project with Jenkins?

Now that you have Jenkins running, it’s time to create your first build. Find out how.

Image: Deemerwha studio/Adobe Stock

Recently, I walked you through the process of deploying Jenkins, the CI/CD automation platform. With this tool at your disposal, your company can begin its agile development journey with continuous deployment and integration.

TO SEE: Hiring kit: Backend Developer (TechRepublic Premium)

But now that you have Jenkins installed, what’s next? Your first step may be to create a test build, and I’ll show you exactly how to do that.

What will you need to build your first project with Jenkins?

All you need for this is a working instance of Jenkins. Once you have that ready, it’s time to create your first build. Let’s just do this.

How can you build your first Jenkins build?

The first thing to do is open Jenkins. Once on the Jenkins homepage, click New Item in the top left corner (Figure A).

Figure A

The Jenkins sidebar contains the New Item button.
The Jenkins sidebar contains the New Item button.

In the window that opens (Figure B), select Freestyle Project and give it a name.

Figure B

For your first build, you'll want to create a Freestyle Project.
For your first build, you’ll want to create a Freestyle Project.

Click OK to continue. In the window that opens (Figure C), give a description of the project in the General section.

Figure C

Giving a description to our new project like My TR Test Build.
Giving a description to our new project like My TR Test Build.

Click the Build Steps tab. Select Execute Shell from the Add Build Step drop-down menu, and then in the resulting field (Figure D), type something like echo “Hello TechRepublic!”

Figure D

You can probably see where this build is going.
You can probably see where this build is going.

Click Save to generate this first Jenkins build. Click Create Now from the left sidebar (Figure E).

Figure E

Now it's time to build the project.
Now it’s time to build the project.

Under Build History you should immediately see a new link with the build date and time. This build should be labeled #1. Click on link #1. In the window that opens (Figure F), click Console Output.

Figure F

History of our test build.
History of our test build.

In the console output you should see the output from the build (Figure G), “Hello, TechRepublic!” and Done: SUCCESS.

Figure G

Our installation was successful.
Our installation was successful.

A very simple build to get you started

This was a very simple build project to demonstrate the Jenkins workflow, which is pretty straightforward especially considering the complexity of CI/CD. I highly recommend continuing to run test builds of increasingly demanding complexity until you are sure that Jenkins can finally help you achieve CI/CD based agile development. Next time, we’ll build something a little more complex than the “Hello World” app.

Subscribe to TechRepublic How to Do Tech Work on YouTube? For the latest technical advice for professional professionals from Jack Wallen.

Leave a Reply

Your email address will not be published. Required fields are marked *