开发者

CruiseControl: How to read logs from exec task

I start an external groovy script via cruisecontrol, which basically works. My problem is that if the groovy script fails I only get the "error string found" in my cruise webapp and email; its even not in the log files. The groovy script writes it output to stdout and to a logfile. How it is possible to display the output of an external script in the cruisecontrol logs?

<project name="proj">
开发者_如何学JAVA    <schedule>
        <exec workingdir="/myscripts/folder"
            command="//bin/groovy"
            args="build.groovy -p ${project.name}.properties"
            errorstr="Exception"/>
    </schedule>
</project>


A way to include something in the build log is to use <merge> element.

I am not sure if this is what you are looking for. But <merge> element takes some file and puts it (merges it into) to the build log.


We had the same problem. The problem is in the exec plugin itself. We patched it to suit our needs and to correctly parse the output of our tools.

You should go here :

http://www.java2s.com/Open-Source/Java-Document/Build/cruisecontrol/net/sourceforge/cruisecontrol/builders/ExecBuilder.java.htm

Understand how it works and patch it. Then you will need to recompile cruisecontrol.jar with your now patched plugin. Unfortunately cruisecontrol is not maintened any more and as you will see the exec plugin is also a custom plugin.

Hope it helped.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜