R – way to specify one artifactsDirectory for the whole site in CruiseControl.Net

continuous integrationcruisecontrol.net

so from what i can tell, you have to specify artifacts and working directory per project, every time.

I guess I'm looking for a way to move the cc.net project name folder to other than where the server was launched from, so that I can do something like:

<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>

Then, I won't have to specify these directories separately for each project. They will just get created under the project name under some default folder structure based on – i.e. D:\Integration\working\ being the base for

Best Answer

Ever thought about using preprocessor commands?

<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>
Related Topic