Reputation: 751
I am trying to setup cruisecontrol in a Linux environment. I have some experience with cc.NET, but this is the first time I have ever tried to use the 'nix version. This is what I have for my build.xml:
When I run "ant project1", everything seems to work except that it tells me: /opt/cruisecontrol-bin-2.8.3/projects/portal/build.xml:8: Problem: failed to create task or type modificationset Cause: The name is undefined.
I can't seem to find another way to say "only build when a change is checked into svn." I am using CC 2.8.3. Any ideas?
<?xml version="1.0" encoding="UTF-8"?>
<project name="project1" basedir=".">
<target name="checkout">
<exec executable="svn" dir="${basedir}/source">
<arg line="up" />
</exec>
</target>
<modificationset>
<svn localWorkingCopy="projects/${project.name}/source/"/>
</modificationset>
<target name="php-codesniffer">
<exec executable="phpcs"
dir="${basedir}/source"
output="${basedir}/build/logs/checkstyle.xml">
<arg line="--report=checkstyle
--standard=PEAR
--ignore=src/autoload src/"/>
</exec>
</target>
<target name="publish">
</target>
<target name="build" depends="checkout,php-codesniffer" />
</project>
Upvotes: 0
Views: 746
Reputation: 24311
Hmm... I don't quite follow your setup. The XML file you posted is supposed to be an ANT build file or CruiseControl XML configuration file?
Because these two are different.
<target>s
usually show up in the ANT file, while <modificationset>
is something typical for CruiseControl configuration. By accident they both use <project>
element.
So I would suggest you moving the <modificationset>
to CC config file. There's an option as well to tell CC to build only when any modifications are found (isn't it the default setting?).
EDIT: And BTW, the issue doesn't seem to have anything in common with Unix per se. I tend to believe you would run into the same problems on Windows.
Upvotes: 2
Reputation: 289
For continuous building I use cronjob and this script:
#!/bin/bash
cd myLocalWorkingCopy
if [[ \"`/usr/bin/svn info -r HEAD`\" = \"`/usr/bin/svn info -r BASE`\" ]]; then
echo "local working copy up to date"
else
/usr/bin/nant -buildfile:myBuildfile.build -logfile:myLogfile.log
fi
I hope this helps...
Upvotes: 0