Change operation flow in cruisecontrol.net for DVCS?

The CruiseControl.NET operation flow, documented in the Operation flow of CCNet FAQ, where the label is generated first makes some sense for a centralized VCS but not so much for a DVCS. With a DVCS, it would be better to generate the label after getting the source because the source itself might be needed for the label (eg, the .hgtags file in Mercurial or other local source files used to compute version and build numbers).

Has anyone figured out a way to run the CCNet labeller after getting the source?


We don't use the Labeller in CC.NET, but nevertheless, our approach might work for you as well:

  • create a separate project MercurialCheckout that performs
  • Mercurial checkout
  • Executable task that updates a text file triggers/mercurial.txt on the build server
  • change your "real" project from sourcecontrol type mercurial to sourcecontrol type filesystem, watching the triggers/directory
  • Your real project then includes the Labeller task, and since the Mercurial checkout was done before, the Labeller should generate the "right" label.

    Kind regards Frank


    There's no way to make the labeller task execute after the source control task. But you only need that if your label source data is exclusively stored in the local working directory. You said your label source is in version control, so you should use a labeller than can retrieve it from version control.

    Most version control systems have a command-line that will allow you to read the file contents from stdout. CCNet labellers are easy to write and deploy. You can take in the command-line and arguments required to fetch the latest version info directly from the source.

    Example ccnet labeller config

     <labeller type="svnLabeller">
       <svn>C:Program Files (x86)svnbinsvn.exe</svn>
       <repository>https://path.to/project</repository>
       <versionInfoPath>/AssemblyInfo.cs</versionInfoPath>
      </labeller>
    
    链接地址: http://www.djcxy.com/p/3988.html

    上一篇: 面部识别和老化的面孔在c + +

    下一篇: 在Cruisecontrol.net中更改DVCS的操作流程?