views:

51

answers:

2

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

+1  A: 

OK, now I see. I don't think currently there is a way to do that, but would be a good feature. You should go to the google group ccnet-devel and post a message there as a feature request. I too, could use this. Good Idea.

Alex
sorry about the confusion, I edited the entry to make it more clear.
Jiho Han
+1  A: 

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>
The Chairman
I do use preprocessors but not in the way you suggested. Most of my projects don't fit a single template but still I see how nested expansion might work. Still I'd love to be able to simply declare a new base directory for all project related directories.
Jiho Han