Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I see why a Jenkins build failed?

Tags:

jenkins

I am trying to create my first Jenkins build job on a new Jenkins server. On the first two attempts the job failed; after I fixed those problems, the next build (which I requested manually by clicking "build now") failed - but there was no build error given.

The only useful information I see is "No changes" (and a mercurial revision ID) on the build status page.

How can I see why the build failed?

like image 658
Robin Green Avatar asked May 15 '12 08:05

Robin Green


People also ask

How does Jenkins know when a build fails?

This plugin analyzes the causes of failed builds and presents the causes on the build page. It does this by using a knowledge base of build failure causes that is built up from scratch. Saving statistics about failure causes is also possible.

Where do u see failed test cases in Jenkins?

Where do u see failed test cases in Jenkins? If you use the TestComplete Support plugin to run TestComplete tests with Jenkins, after the build run is over, the plugin will publish test results to Jenkins automatically. You can view them on the build results page.

How do I fix broken build in Jenkins?

The user needs to open the console output for the build and will try to see if any file changes that were missed during building the project. If there aren't any problems on it then a much better approach would be clean and update his local workspace to copy the problem on their local machine and will try to solve it.


2 Answers

Never mind. I needed to click on the "Console output" link on the left.

like image 99
Robin Green Avatar answered Sep 20 '22 00:09

Robin Green


Go to the project page and Click on the failed build number from the 'Build History'.

  • Click on the 'Console Output', [Console Output gives the details like line by line build execution sequence with time stamp,Build Success messages, Build Failure messgaes, File location details at which ERROR has occured, ERROR details etc..,]

  • Look for the details: File at which the ERROR has occured, ERROR details.

    You can still investigate...

  • Click 'Back to Project'

  • Then Click Workspace on the left and go to the specified file location. Ex: data-mart-db/target/ [You can find log files below the actual code files.]

  • Open the log files one by one and go to the end of file(ctrl+end). Error details will be displayed, if the error has occured in that file.

    Fix the ERRORs in the local setup first & then do the checkins to the repository again.

    Happy Coding !!!

like image 38
Linga Swamy Parandha Avatar answered Sep 22 '22 00:09

Linga Swamy Parandha