Does anyone know how to listen for build events from an already running cctray process, in C #?

I have made a C # application and I am trying to figure out if I can trigger the cctray (cruise control tray) build events? I don't want to reinvent the wheel, I just want to know when my assemblies failed or succeeded (on the client machine) than my custom C # application can execute a specific set of routines.

+1


source to share


2 answers


You can add CruiseControl remote library as refrence and instantiate CruiseManagerFactory and this line will give you the status of all projects. ServerUri is a string in the format tcp: // ServerName: Port / CruiseManager.rem

ProjectStatus[] currentStatuses = managerFactory.GetCruiseManager(ServerUri).GetProjectStatus();

      



in this example, I obviously named my instance CruiseManagerFactory managerFactory. Then the ProjectStatus array has the current status of all projects at ServerUri.

0


source


Any reason you can't use your build tool to do this?
for example in Nant you can specify a target to be executed when a build fails or succeeds using the nant.onfailure and nant.onsuccess properties . For build purposes, you can invoke your C # application using task execution.
CruiseControl onSuccess and onFailure publishers ... but strangely can't find them in CruiseControl.net.



-1


source







All Articles