How to Create and Troubleshoot Job in Jenkins

Share via:

In this article,we will see How to Create and Troubleshoot Job in Jenkins.

Steps to Follow

  1. Logging to Jenkins.
  2. Create a Second Item/Job in Jenkins.
  3. Verify the job “kt-firstjob” in the jenkins dashboard.
  4. Build second job “kt-secondjob”.
  5. Verify console out put of Job “kt-secondjob”.
  6. Troubleshoot job “kt-secondjob”.
  7. Build job “kt-secondjob”.
  8. Verify console out put of Job “kt-secondjob”.

First,we need to go Jenkins Logging page by using below link.
http://localhost:8080/

1. Logging to Jenkins

Provide username and password and click on Sign in.

This image has an empty alt attribute; its file name is 1-26.png

We can see the Main Dashboard of Jenkins.

This image has an empty alt attribute; its file name is 2-19.png

2. Create a Second Item/Job in Jenkins

Click on New Item to create a new job.

Enter an Item name “kt-secondjob” and select “Freestyle project” and click on OK.

If you want run windows command we need to select “Execute Windows batch command” from below list.

This image has an empty alt attribute; its file name is ktexperts-3.png

Here,I am intentionally giving wrong command,It is not proper window batch command and click on Save.

3. Verify the job “kt-firstjob” in the jenkins dashboard

Click on Jenkins.

We can see the job “kt-firstjob” which was created earlier.

4. Build second job “kt-secondjob”

Go to second job “kt-secondjob” and right click and select build now option from list.

We can see the job is in red color which means the job “kt-firstjob” is failed.

5. Verify console out put of Job “kt-secondjob”

Go inside the job by clicking on job “kt-secondjob”.

Go inside the red ball for seeing the console output.

We can see the console out with failed message.

6. Troubleshoot job “kt-secondjob”

Click on Back to Project.

Click on configure.

Enter proper command (correct command) in the command field and click on save.

7. Build job “kt-secondjob”

Click on Build Now.

We can see the job is in blue color which means the job “kt-secondjob” is build successfully.

8. Verify console out put of Job “kt-secondjob”

click on blue ball to see the console output.

This image has an empty alt attribute; its file name is 15.png

We can see the console out with build success message.

Thank you for giving your valuable time to read the above information.
Follow us on 
Website  www.ktexperts.com
Facebook Page KTexperts
Linkedin Page : KT EXPERTS

Share via:
Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Add Comment