有没有办法在CruiseControl.Net中为整个站点指定一个artifactsDirectory?

时间:2009-07-10 19:58:46

标签: continuous-integration cruisecontrol.net

所以从我所知道的,你必须每次都为每个项目指定工件和工作目录。

我想我正在寻找一种方法将cc.net项目名称文件夹移动到除启动服务器之外的其他位置,以便我可以执行以下操作:

<cruisecontrol xmlns:cb="urn:ccnet.config.builder">

    <!-- something like this should exist
    <baseDirectory>D:\Integration</baseDirectory>
    -->

    <project name="MyProject1">
        <workingDirectory>D:\Integration\working\MyProject1</workingDirectory>
        <artifactDirectory>D:\Integration\artifacts\MyProject1</artifactDirectory>
        <state type="state" directory="D:\Integration\state\MyProject1" />
    </project>

    <project name="MyProject2">
        <workingDirectory>D:\Integration\working\MyProject2</workingDirectory>
        <artifactDirectory>D:\Integration\artifacts\MyProject2</artifactDirectory>
        <state type="state" directory="D:\Integration\state\MyProject2" />
    </project>

</cruisecontrol>

然后,我不必为每个项目单独指定这些目录。它们只是在项目名称下创建,基于一些默认的文件夹结构 - 即D:\ Integration \ working \是

的基础

2 个答案:

答案 0 :(得分:2)

有没有想过使用预处理程序命令?

<cruisecontrol xmlns:cb="urn:ccnet.config.builder">

    <cb:define name="project.template">
        <project name="$(project.name)">
            <workingDirectory>D:\Integration\working\$(project.name)</workingDirectory>
            <artifactDirectory>D:\Integration\artifacts\$(project.name)</artifactDirectory>
            <state type="state" directory="D:\Integration\state\$(project.name)" />
        </project>
    </cb:define>

    <cb:project.template project.name="MyProject1" />

    <cb:project.template project.name="MyProject2" />

</cruisecontrol>

答案 1 :(得分:1)

好的,现在我明白了。我认为目前没有办法做到这一点,但这将是一个很好的功能。您应该转到Google群组ccnet-devel并在那里发布消息作为功能请求。我也可以使用它。好主意。