How to create your first project with Jenkins

Now that you have Jenkins up and 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 the CI/CD automation platform Jenkins. With this tool at your disposal, your company can begin the journey toward agile development with continuous deployment and integration.

SEE: Hiring kit: Back-end Developer (TechRepublic Premium)

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

What you’ll need to create your first project with Jenkins

The only thing you’ll need for this is a running instance of Jenkins. Once you have that ready, it’s time to create your first build. Let’s do just that.

How to create your first Jenkins build

The first thing to do is open Jenkins. Once you’re on the Jenkins main page, click New Item in the upper left corner (Figure A).

Figure A

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

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

Figure B

You'll want to create a Freestyle Project for your first build.
You’ll want to create a Freestyle Project for your first build.

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

Figure C

Giving our new project a description, such as My TR Test Build.
Giving our new project a description, such as My TR Test Build.

Click on the Build Steps tab. From the Add Build Step drop-down, select Execute Shell 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 create this first Jenkins build. From the left sidebar, click Build Now (Figure E).

Figure E

It's now time to build the project.
It’s now time to build the project.

You should almost immediately see a new link under Build History with the date and time for the build. This build should be labeled #1. Click the #1 link. In the resulting window (Figure F), click Console Output.

Figure F

The history of our test build.
The history of our test build.

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

Figure G

Our build was successful.
Our build was successful.

A very simple build to get you started

This was a very simple build project to show you the Jenkins workflow, which is actually pretty simple, especially given the complexity of CI/CD. I would highly recommend you continue running test builds of increasingly more challenging complexity, until you feel confident Jenkins can help you finally achieve CI/CD-based agile development. Next time around, we’ll build something a bit more complex than a “Hello, World” application.

Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.

For all the latest Technology News Click Here 

 For the latest news and updates, follow us on Google News

Read original article here

Denial of responsibility! TechNewsBoy.com is an automatic aggregator around the global media. All the content are available free on Internet. We have just arranged it in one platform for educational purpose only. In each content, the hyperlink to the primary source is specified. All trademarks belong to their rightful owners, all materials to their authors. If you are the owner of the content and do not want us to publish your materials on our website, please contact us by email – [email protected]. The content will be deleted within 24 hours.