Saturday, February 5, 2011

CruiseControl.NET Set Variable to a dynamic value

Hi *,

is there any plug-in or other possibility to set an environment variable in CC.NET 1.4.2 to some generated value. I would like to pass to MSBuild some random value (can be a time stamp where to put some build reports). Afterwords all the generated report files from the randomly named dir will be merged to cc.net report.

The problem here is that I can't use the CCNetBuildDate + CCNetBuildTime environment variables, due to the format of CCNetBuildTime (HH:mm:ss), because : is not a valid character for directory name. I could use them if CC.NET supports ':' replacement by some other char (e.g. '-').

I can use MSBuild community task to create the output directory with the help of <Time>-task, the problem is that I don't know how to return to CCNet in which random dir the reports were produced.

I can't use the labeller either, because we have rewritten the labeller and it always returns the dummy label (I know that is very bad and changes ccnet logic, but currently I have no choice).

I can write a plug-in, but I would like to use as much default technologies as possible.

Many thanks,
Ovanes

  • Can't you just produce the report files in the normal project working directory and merge them from there? Every other external reporting tool works this way.

    ovanes : Probably this is the way I have to go. Many thanks for the answer.
    From skolima

0 comments:

Post a Comment