Publish build log if build fails.
I have a working ant script that does a VisStudio build and unit tests. If there are no compile errors everything works fine including publishing the build log. However if there is a compile error my build log doesn't seem to get published. I used to have the publish log step in the same target as the compile. I thought if I moved the publish log section to its own target that it would publish the log to RTC even if the compile fails. It appears like if the compile fails that the ant script stops. I need to get that log published no matter what the build status is so the developers can view the log if need be.
Thanks for any help/advice.
jeff
Thanks for any help/advice.
jeff
One answer
I suggest using this approach:
http://stackoverflow.com/questions/2819622/try-finally-in-ant
Alternatively, you could move the compilation steps to a separate build file and use the subant task with failonerror="false" from the outer script, which will also do the publishing.
http://ant.apache.org/manual/Tasks/subant.html
http://stackoverflow.com/questions/2819622/try-finally-in-ant
Alternatively, you could move the compilation steps to a separate build file and use the subant task with failonerror="false" from the outer script, which will also do the publishing.
http://ant.apache.org/manual/Tasks/subant.html