aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Jenkins issue: Build Successfully but Finished: Failure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Jenkins issue: Build Successfully but Finished: Failure" Watch "Jenkins issue: Build Successfully but Finished: Failure" New topic
Author

Jenkins issue: Build Successfully but Finished: Failure

Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 1001
    
    2
i am building one job in jenkins, it is building successfully but it showing me this:
BUILD SUCCESSFUL
Total time: 3 minutes 59 seconds
Finished: FAILURE

why it finished with failure?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

Impossible to tell with the text you provided. Look at all of the console output, perhaps there is an error earlier on. If Ant returns a non-zero value then Jenkins will print the "Finished: FAILURE" message. Or perhaps you have a multi-part build and subsequent parts failed to run. Ditto for post-build steps (for example, the mail-ext plugin ran into a problem). You might have to look at the Jenkins logs to track down the root cause.


JBoss In Action
Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 1001
    
    2
i search for error in the console track, i found 2:

cleartool: Error: Branch type not found: "[branch_name]"
cleartool: Error: Branch type not found: "[branch_name]"
any suggestions??

also there is lot of warnings, but as far as i know warnings are not makes build fail?

If Ant returns a non-zero value then Jenkins will print the "Finished: FAILURE" message.

how to check, what Ant has returned? or FAILURE itself means non-zero?

Ditto for post-build steps (for example, the mail-ext plugin ran into a problem).

but if this is the case, than it should show somewhere on the console that sending email failed.

You might have to look at the Jenkins logs to track down the root cause.

i searched for that but i was unable to find.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

Punit Jain wrote:but if this is the case, than it should show somewhere on the console that sending email failed.

I would never make that assumption.

Punit wrote:i searched for <the log file> but i was unable to find.

Under the Jenkins installation directory there should be a jobs directory, and a subdirectory for each job, and another subdirectory for job number, there is a log directory there. Example: jenkins/jobs/myjobname/8/log

The warnings are from clearcase, so I have no idea about them.
You might try running Ant with the -v or -d options, that might give you some more information.
Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 1001
    
    2
Solved: The problem is because it was not finding the viewroot for clearcase, that is solved by providing the clearcase viewroot in the job configuration.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

Thank you for providing the details of the solution! I'm sure that other ranchers who run into the same issue and come across this post will thank you also.
Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 1001
    
    2
you are welcome.
 
Don't get me started about those stupid light bulbs.
 
subject: Jenkins issue: Build Successfully but Finished: Failure