|
|||||
|
|||||
Project Configuration
h2 How to set up DamageControl to work with your project These are the basic steps:
If you need help, ask on the mailing lists or the irc channel, see Contacting the project. If you have a feature request or bug report, report them here: http://jira.codehaus.org/secure/BrowseProject.jspa?id=10260. Patches are always welcome, preferrably in unified diff format. Installing the DamageControl trigger into your SCMManually installing DamageControl into CVSThis section explains how to DamageControl a CVS module. A CVS module is DamageControlled by configuring the CVS repository to fire an event (over XML/RPC) to the DamageControl server. This is done by editing some files in the CVSROOT module. Install DamageControl on the source control serverRefer to Subversion Access for more instructions. Check out CVSROOTFirst check out the CVSROOT of your project. cvs -d<cvsroot to your repository> checkout CVSROOT Install the triggerAdd the following line to CVSROOT/loginfo. <name of module> <path to your DamageControl installation>/bin/requestbuild(.cmd) --url http://your-damagecontrol-host:4712/private/xmlrpc --projectname <name of project>
Explanation:
(NEW!) Centralised configurationThere is a new way of storing configuration files for DamageControl. This explains how this work. Create a Configuration fileThe new centralised configuration is a lot easier to administrate. To configure your project you need to access to the DamageControl server to be able to create the configuration files necessary. Create a file in <damagecontrol config root>/<project name> named conf.yaml }}. {{<damagecontrol config root> is the root you specify when starting DamageControl, on Codehaus this is ~dcontrol/build. (In the rest of these instructions, xxx means the name of your CVS module. Ex: foo or foo/bar). Specify the information that the DamageControl server will need in order to build your code and notify you: project_name: Foo scm_spec: ":ext:dcontrol@cvs.codehaus.org:/cvsroot/blah:foo" build_command_line: "maven clean jar:deploy site:deploy" nag_email: foo-dev@lists.codehaus.org
Note that if you specify the :ext: protocol, the dcontrol user must be part of the project. This is to enable DamageControl to tag the CVS after a successful build. (File a Codehaus Chore if you want to add the dcontrol user to your project). Otherwise, if you don't care about DamageControl tagging your CVS, just specify :pserver:anonymous instead. If the specified nag_email is a mailing list that allows posts from members only, you should subscribe dcontrol@builds.codehaus.org to the specified mailing list. This can be done via the mailman interface at http://lists.codehaus.org/. Make sure to tick the nomail option. If you don't know the password for your mailing list, file a Codehaus Chore in JIRA for this. Check out CVSROOTA CVS module is DamageControlled by configuring the CVS repository to fire an event (over TCP/IP) to the DamageControl server. This is done by editing and adding some files in the CVSROOT module. Create triggering scriptTo use the following Ruby script to do the triggering you need to install ruby 1.8 and xmlrpc4r (http://www.fantasy-coders.de/ruby/xmlrpc4r/) on the client machine and install the dctrigger.rb script that triggers the server. Create a file called dctrigger.rb in the CVSROOT with the following content: require 'xmlrpc/client' url = ARGV[0] project_name = ARGV[1] puts "Triggering DamageControl build to #{url} for project #{project_name}" client = XMLRPC::Client.new2(url) build = client.proxy("build") result = build.trig(project_name, Time.now.utc.strftime("%Y%m%d%H%M%S")) puts result Add this file using cvs add. If you want you can use any other scripting language that supports XML/RPC. The URL to call is http://beaver.codehaus.org:8080/build, the signature of the method is build.trig(String, String) where the first argument is project name, and the second argument is the timestamp that the build should work off, it must be in UTC timezone and formatted YYYYMMDDmmhhss. Tell CVS about the trigger scriptAdd the name of your trigger script file to CVSROOT/checkoutlist. dctrigger.rb Set up loginfo to run the trigger scriptThe last step is to configure CVS to run the trigger script which will fire off a message over the wire when new files are committed in the CVS module you want to be DamageControlled. Add the following line to CVSROOT/loginfo: modulename ruby dctrigger.rb http://builds.codehaus.org:4712/private/xmlrpc projectname
Explanation:
That's it!If you now try to commit files to your DamageControlled CVS module, you should see something like this on the output from your CVS client: Checking in prump.txt; /cvsroot/blah/foo/prump.txt,v <-- prump.txt new revision: 1.4; previous revision: 1.3 done DamageControl server on 0.0.0.0/0.0.0.0 got message from eng.werken.com / 66.216.68.111 http://damagecontrol.codehaus.org/ Success, CVS operation completed In addition to the emails you'll be getting, you can also monitor build status here:
(If your DamageControl server is running somewhere else, ask the guy who set it up where to access this information). |
|||||
|
Copyright 2003-2006 - The Codehaus. All rights reserved unless otherwise noted.
Powered by Atlassian Confluence
|
|||||