"Getting Started with Jenkins: Installation and Creating Your First Job to Print 'Hello World"

"Getting Started with Jenkins: Installation and Creating Your First Job to Print 'Hello World"

1- What is Jenkins?

Jenkins is an open-source automation server that helps developers to automate parts of their software development process, such as building, testing, and deploying their code.

In simple terms, Jenkins allows developers to set up a series of automated tasks that help them save time and effort. For example, instead of manually building and testing their code every time they make a change, they can use Jenkins to automate these tasks, which helps them identify and fix issues quickly.

Jenkins can integrate with a wide range of tools and technologies, making it a versatile tool for software development teams. It also has a large community of users and contributors who provide support and regularly update the software.

2- How to install Jenkins?

1- Update the package lists by running the command:

sudo apt-get update

2- Install Java Development Kit (JDK) using the command:

sudo apt-get install openjdk-11-jdk

3- Check the Java version:

java --version

You will get the Installation process for Java on Jenkins Offical Page. Just follow in order.

4- Install Jenkins using the command:

Just above the Java installation, you will see the Weekly release for installing the New release Jenkins with commands, just copy all the command and Run it on your system terminal.

It will add the Jenkins repository key and add the Jenkins repository to your system source list and update and install Jenkins altogether. As shown in the image below.

5- After the installation is complete, Check the Jenkins service using the command:

systemctl status jenkins

6- Now add port:8080 because Jenkins usually runs on this port:

If you are using AWS then go to the Instance - security group and add a rule to port 8080

7- Copy the server IP address and add 8080 and open the Jenkins, At first, the Jenkins will open as locked - to unlock copy the red marked path in the interface and sudo cat /path to the terminal to get the password and copy the password and paste and to unlock Jenkins.

9- After unlocking Jenkins install the suggested plugins:

10- After that setup Jenkins as the first admin user:

Remember the username and password as it is used to log in to Jenkins.

11- Jenkins page will open and it's ready to be used to create awesome projects by you:

That's it! You have successfully installed Jenkins on your Linux Ubuntu system via the terminal.

---------Task---------

Create a freestyle pipeline to print "Hello World!!

1- At First click on Create a job.

2- After a page will open - type the item name or job name and click on Freestyle project and OK.

3- After that Configuration page will open - Now, add the job description.

4- On the same page go below and select Build step and Execute shell and write the shell script for the job and Save the output. As shown in the image below.

5- As soon as you save the configuration a job will be created. Now, click on Build Now option on the left-hand side of the screen. And on the Second image, you will see that job is started building- on the bottom left-hand side.

6- Now as the job is created click on the green tick #1 option and go to the console of the build and you will be able to see the output.

As you see in the Second image. "Hello World" is printed along with the message - "First step to learn Jenkins..."

Congratulation you have successfully Installed and created the first job on Jenkins.

"Thank you so much for taking the time to read my blog post! I hope that you found the information useful and that it has helped you in your journey with Jenkins. Your support means a lot to me, and I appreciate the time you took to engage with my content. If you have any questions or feedback, please don't hesitate to reach out to me. Thank you again for your continued support!"