Change workflow in cruisecontrol.net for DVCS?

The CruiseControl.NET workflow documented in Operating the CCNet Stream Frequently Asked Questions that generate a tag primarily makes sense for a centralized VCS, but not DVCS. Using DVCS, it would be better to create a shortcut after receiving the source, because the source itself may be needed for the label (for example, the .hgtags file in Mercurial or other local source files used to calculate the version and build the numbers).

Has anyone figured out how to start the CCNet collector after receiving the source?

+7
source share
2 answers

We do not use Labeller in CC.NET, but, nevertheless, our approach can work for you too:

  • create a separate MercurialCheckout project that executes
    • Mercurial checkout
    • An ongoing task that updates the triggers of the text file /mercurial.txt on the build server
  • change your "real" project from a file system of type sourcecontrol of type mercurial to source code by looking at the trigger directory /

Your real project now includes the Labeller task, and since the Mercurial check was done earlier, Labeller must generate the “correct” label.

Regards Frank

+3
source

There is no way to force the labeller task to complete after the source control task. But you only need this if your original tag data is stored exclusively in the local working directory. You said your source of shortcuts is version control, so you should use a label to get it from version control.

Most version control systems have a command line that allows you to read the contents of a file from stdout. CCNet booklets are easy to write and deploy. You can take at the command line the arguments needed to get the latest version information directly from the source.

Ccnet labeller configuration example

  <labeller type="svnLabeller"> <svn>C:\Program Files (x86)\svn\bin\svn.exe</svn> <repository>https://path.to/project</repository> <versionInfoPath>/AssemblyInfo.cs</versionInfoPath> </labeller> 
0
source

All Articles