I have some code I run against other code. Let say command x runs code blah.c
I have written a script to check to see if that command executed successfully. I am able to determine this. I will be running the script in the execute build box available in hudson.
I need to know who to fail the build if any of there code tests fail. meaning command x ran on blah.c returned in failure.
Best practices for jobs not built by maven. Is it possible to integrate maven?
Please and thank you.
Personally, I use either ANT or Phing for this kind of thing. You can specify the steps necessary to complete a “target”.
So in your case, you’d specify an
exectask. Then, you’d set thecheckreturnproperty on that task. So that way, if the command returns anything but0, it’ll fail the target. And Hudson will automatically fail the build.The nice thing about this, is that you can manually execute the
ANTbuild task outside of Hudson (so you don’t need to commit to verify if it will build successfully). I personally keep my phing build.xml file inside the same version control as my project so that I always have it available…