I keep our .configs under source control, and have bootstrap projects
that monitor for changes.
I'm on CCnet 1.4, so I use ccnet itself to validate XML before
redeploying the .config file.
I have the server set to watch for .config file changes (which I think
is the deafult? I can't remember.)

I have a project in my .config that watches for changes to the .config
itself:
        <project name="ccnet-bootstrap">
                <webURL>&dashboard-url;/ccnet-bootstrap/ViewProjectReport.aspx</
webURL>
                <workingDirectory>&build-path;\ccnet-bootstrap\working</
workingDirectory>
                <artifactDirectory>&build-path;\ccnet-bootstrap\artifacts</
artifactDirectory>
                &default-state;

                <labeller type="dateLabeller" />

                <sourcecontrol type="svn" autoGetSource="true" timeout="300000"
executable='&svn-exe;'>
                        
<trunkUrl>file:///C:/local_svn_storage/srcweb/srcwebtools/trunk/
build</trunkUrl>
                </sourcecontrol>

                <tasks>
                        <exec executable="python.exe" 
buildArgs="update_ccnet_config.py" />
                </tasks>

        &default-publishers;
        </project>



The build script that gets called is along the lines of (Python
script, using a simple "build library"):

print "= CruiseControl.NET bootstrap ="
print "Verifying ccnet config files..."

with working_folder("ccnet"):
    result,output = run(CCNET_EXE+" -validate -config:ccnet-web.config
2>nul")
    if result != 0:
        sys.stderr.write("error: could not verify \"ccnet-web.config
\"\n")
        message = output if output else "(unknown error - is the path
to ccnet.exe incorrect?)"
        sys.stderr.write(message)
        sys.exit(99)

print "Staging new config files..."
run("copy ccnet\\*.* "+REAL_CONFIG_PATH)

print "done."

Reply via email to