Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Hudson » How to check the Console Output for a specific string and raise an error on the Build?
How to check the Console Output for a specific string and raise an error on the Build? [message #1719857] Tue, 12 January 2016 15:55 Go to next message
Joao Pedro is currently offline Joao PedroFriend
Messages: 1
Registered: January 2016
Location: Lisbon
Junior Member
Hi all

This is my first post.

I have Hudson configured for building a project. And the console output, after building is, as follows:

Compiling ./main.py ...
Sorry: IndentationError: ('expected an indented block', ('./main.py', 8, 6, 'thread.start_new_thread( foo.FooThread, () )\n'))
Compiling ./udpReceiver.py ...
<<<<< build finished!
POST BUILD TASK : SUCCESS
END OF POST BUILD TASK : 0

Deleting project workspace... 
done

Finished: SUCCESS


As you can see, I have an Indentation Error....and Hudson says that the build job finished with success.

What I want is something like this:

Check if the string "IndentationError" is presented on the console output ... if so, than the build should be:
Finished: FAILED!!!!!!!!


How can I accomplish this? Smile
Thanks
Re: How to check the Console Output for a specific string and raise an error on the Build? [message #1719888 is a reply to message #1719857] Tue, 12 January 2016 22:08 Go to previous message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
I'm not sure how you are building the compilation step. Hudson has no idea about whether the compilation passes or fails. The build step (Ex maven, or shell script) has to tell Hudson that the build step has failed, then only Hudson mark the build as failed.

Winston Prakash
Eclipse Hudson team
Previous Topic:Embeddable Build Status plugin for Hudson
Next Topic:disabling anonymous user blocking users to loginto hudson 3.3
Goto Forum:
  


Current Time: Tue Mar 19 07:01:55 GMT 2024

Powered by FUDForum. Page generated in 0.02638 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top