开发者

Subversion block in CruiseControl.NET - passing specific revision number?

开发者 https://www.devze.com 2022-12-09 08:28 出处:网络
I would like the ability to pass a specific revision to the SVN task (in ccnet.config) that I want the b开发者_C百科uildserver to checkout from SVN and build. So I don\'t always want the latest revisi

I would like the ability to pass a specific revision to the SVN task (in ccnet.config) that I want the b开发者_C百科uildserver to checkout from SVN and build. So I don't always want the latest revision. And no, I don't want to create a tag for every successful build.

Looking at the configuration elements here: http://ccnet.sourceforge.net/CCNET/Subversion%20Source%20Control%20Block.html

And I cannot see anything that allows me to do this. The idea is to be able to pass an optional parameter (using the Dynamic Properties in 1.5) and simply pass that into something for the SVN task. Is this achievable at all with the current CCNET SVN plugin? Am I missing something obvious?


Can be easily achieved directly with CCNET scripts this way :

<project name="whatever">
    <parameters>
        <textParameter name="VersionToBuild">
            <display>SVN Version to Build</display>
            <description>Which SVN version to Build?</description>
            <default>HEAD</default>           
            <required>true</required>
        </textParameter>
    </parameters>

    <sourcecontrol type="svn">
        <trunkUrl>http://svnrepo.mydomain.com:80/svn/myProject/trunk@$[VersionToBuild]</trunkUrl>
        <workingDirectory>c:\Checkout\myProjectTrunk</workingDirectory>
        <executable>c:\Subversion\bin\svn.exe</executable>
        <username>dummy</username>
        <password>dummy</password>      
    </sourcecontrol>
</project>


You can set up your own nant exec task to retrieve the source from subversion rather than using the sourceControlProvider block. This would allow you to retrieve whichever revision you like.

If you still want to use the sourceControlProvider block to trigger the build, set autoGetSource="false". However, seeing as you are wanting to build a specific revision, I don't know if the trigger functionality of the sourceControlProvider would be useful.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号