English 中文(简体)
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">
    <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.





相关问题
Eclipse CDT static resources under build folder

I m building a C++ project under Eclipse and my release folder should include a static sub-folder with some files inside it, those are required by executable during runtime. The problem is that this ...

Multiple Output paths for a C# Project file

Can I use multiple output paths. like when i build my project, the exe should generate in two different paths. If so, How can I specify in Project Properties-> Build -> output path? I tried using , ...

Running multiple TeamCity Agents on the same computer?

We have several build machines, each running a single TeamCity build agent. Each machine is very strong, and we d like to run several build agents on the same machine. Is this possible, without using ...

couldnt recognise pom.xml file

i am build forge as build tool. it is executing maven mvn commands fine ,but it couldnt recognizing the maven project pom.xml to run the build.so i tried to execute the same pom.xml through the ...

Cobertura ant script is missing Log4J classes

I tried to get Cobertura running inside my ant script, but I m stuck right at the beginning. When I try to insert the cobertura taskdef I m missing the Log4J libraries. Ant properties & ...

Why not use TFS as a build / CI solution?

Currently our build solution is set up using TFS + MS Build scripts. TFS is also being used as a CI server. I ve seen several posts on this site telling people about other CI solutions. Are there ...

Multiple websites running on same codebase?

We are developing an application that would be offered as a hosted solution. I am struck with understanding how can i use multiple sites with same code without duplicating base code. eg: website 1: ...

热门标签