Carvellis
Carvellis

Reputation: 4042

Can I get MSBuild output from CCNet api?

I am building an asp.net shell on top of CCNet 1.5, where I send commands like force build to CCNet through the api. The ThoughtWorks.CruiseControl.Remote namespace has methods to get information from CCNet on the build, like status, elapsed time, etc.

I would like to programmatically get the MSBuild task output from the CCNet api, but I haven't seen any methods for this. Is it at all possible? Or do I need to scan output files on disk or something? Any suggestions?

Upvotes: 0

Views: 351

Answers (3)

Alex
Alex

Reputation: 2047

You can get all that through the CCNet API like:

var remoteCruiseManagerFactory = new CruiseServerClientFactory();

var client = remoteCruiseManagerFactory.GenerateRemotingClient("tcp://build:21234/CruiseManager.rem");

var history = client.GetModificationHistoryDocument("MyProjectName");

client.LostOfMoreGoodStuff();

Upvotes: 1

Carvellis
Carvellis

Reputation: 4042

The solution was to implement a custom IMergeTask and save the build log to database. In the end, it isn't possible to get the build log through the api.

Upvotes: 0

Arthur
Arthur

Reputation: 8129

Don't know if you can get build log number, but if then you could retrieve the XML Log file from the Dashboard?

http://buildsrv/ccnet/server/local/project//build/log20100716115659.xml/XmlBuildLog.xml

(CC.NET Version 1.5.6804.1)

Upvotes: 2

Related Questions