How to setup building steps for CruiseControl.net from repository of the building project?

后端 未结 2 524
醉酒成梦
醉酒成梦 2021-01-24 17:32

I\'d like to store ccnet.config file (or other cc.net configuration file for this project) in the repository (git) of my project and make CC.NET use it when I force

2条回答
  •  灰色年华
    2021-01-24 18:00

    Your "ccnet.config" should remain fairly static.

    If you need different "logic" for your solution/project building, then I suggest:

    1.  Write your ccnet.config code to pull source code from repository. (aka, Task #1)
    2.  In your repository, include a MasterBuild.proj (msbuild definition).
    3.  Have cc.net call msbuild.exe on MasterBuild.proj (aka, Task #2).
    4.  Have the majority of your logic inside the MasterBuild.proj file.  That is what you check in/out of source control.
    

    If you think of CC.NET as a "super fancy msbuild.exe executor", you're world will make more sense IMHO.

    Here is a very basic msbuild (definition) file. You can call it

    MySolutionMasterBuild.proj (or similar)

    Put this in the same directory as your .sln file (in source control).

    Use CC.NET to download the code. Then wire up msbuild.exe to call the below file.

    Then have any extra logic inside the .proj file.

    You can do some of the other CC.NET stuff, like post build emailing and merging any results xml, but the majority of the logic (my preference anyways)..........would be in the file below.

    
    
        
            
            .
            $(WorkingCheckout)\ZZZArtifacts
        
    
        
    
            
            
            
    
        
    
    
        
            
                
            
            
        
    
    
    
        
    
    
            
    
            
    
            
    
    
        
    
        
    
            
                
            
    
            
                
                    
    
    
            
    
        
    
    
    

提交回复
热议问题