0

I'm using cruisecontrol.net to do CI, but the test type is configured in an xml file is not what I want. The xml file looks like:

<config>
  <Test type="A"/>
</config>

Is there any way to change it from A to B?

Tan Jinfu
  • 3,327
  • 1
  • 19
  • 20

2 Answers2

0

I would switch mentality a bit.

Think of CC.NET as a "super fancy msbuild.exe executor".

Write most of your logic in msbuild files. Then you can easily find XmlPeek and XmlPoke (XmlUpdate) "extension tasks" that are tried and true.

This has some advantages. If you ever switch from CC.NET to something else (TFS for example), having most of your logic in an msbuild (.proj) file will make that transition very easy.

The more "proprietary" tasks you write that is CC.NET specific, the deeper you get in.

I go with this:

  1. Have CC.NET download your .proj file.
  2. Have CC.NET excecute msbuild.exe yourfile.proj.
  3. Have CC.NET "merge" all resulting xml.
  4. Have CC.NET run its "publishers" (email being the most popular)

Your .proj file will have the majority of logic.

  1. It will pull down the rest of your code.
  2. It will build the code.
  3. It will zip up files or create installers or whatever.

This will serve you better than trying to get CC.NET to do everything.

I don't think there is CC.NET xml-update task.

Msbuild Community Tasks has ~lots of extra tasks to get done what you want to get done.

granadaCoder
  • 26,328
  • 10
  • 113
  • 146
  • Xml Update Example : http://stackoverflow.com/questions/18874195/using-msbuild-with-external-xml-parameter-file/18880029?noredirect=1#comment33787728_18880029 – granadaCoder Mar 07 '14 at 14:20
0

Yes there is with parameters. See this page:

http://cruisecontrolnet.org/projects/ccnet/wiki/Parameters

When someone forces a build a dialog pops up allowing them to choose between test type A and test type B.

Adam Bruss
  • 1,654
  • 14
  • 18