In this article,we will see How to Create and Troubleshoot Job in Jenkins.
Steps to Follow
- Logging to Jenkins.
- Create a Second Item/Job in Jenkins.
- Verify the job “kt-firstjob” in the jenkins dashboard.
- Build second job “kt-secondjob”.
- Verify console out put of Job “kt-secondjob”.
- Troubleshoot job “kt-secondjob”.
- Build job “kt-secondjob”.
- 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.
We can see the Main Dashboard of Jenkins.
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.
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.
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