Re: svn modifcation issues
Hung Huynh <[email protected]>
| Newsgroups | gmane.comp.java.cruise-control.user |
|---|---|
| Message-ID | <[email protected]> |
You need to download and install SVN on your Windows box, the link is here http://www.collab.net/downloads/subversion/ Then follow this link http://www.cs.usask.ca/~wew036/latex/env.html to add SVN to your environment variable PATH ......;c:\path\to\svn\install\dir\bin Notice you need to get the right path there and point it to the "bin" folder. After that, open a cmd.exe shell and run "svn --version". You should get a version report from svn if you set up correctly. --- On Wed, 5/6/09, Ian McLean <[email protected]> wrote: From: Ian McLean <[email protected]> Subject: Re: [Cruisecontrol-user] svn modifcation issues To: [email protected] Date: Wednesday, May 6, 2009, 9:19 PM Mark, Actually the machine I have available at work to do this is a windows box, so I'm running the wrapper. I've already pulled down the working copy into projects with no problem (using tortoise). If I run the ant script outside of CC it builds successfully. I think this is less likely to be an issue. Hung Huynh and Dan Rollo both mentioned that I need svn to run on an OS level in order for this work (thanks for the tip guys). Not exactly sure how to do this in windows. Is it just a matter of setting an evironment variable for "svn" to point to the subversion binary? I was just assuming that the CC svn plugin was self contained and didn't need this. -I Mark Thias wrote: > Hi Ian, > > The <antbootstrapper> executes an ant script but does not update/checkout > the latest bootstrap file as would occur with <svnbootstrapper>, > <cvsbootstrapper> etc. It's best if the bootstrap file is managed by the > source code repository and thus CC can get it if its changed. Bootstrappers > are tasks that are executed before a build starts. But, lets get back to > your real issue which looks to be svn. > > It could be a number of things from svn permissions to OS permissions. What > OS are you using? I'm assuming some type of Unix so those are the commands > I will use below. > > For starters, please follow the below steps so that we can verify svn is > working ok: > 1. Open a command shell terminal > > 2. Become the user that CC will run under > i.e su ccadmin > > 2. change directory into CC's project directory. > For example: cd /usr/local/cc/projects > > 3. use svn from the command line to checkout the project > For example: svn checkout <repository location> <yourproject> > For example: svn checkout file:///data/svn/dev-repos/trunk myproject > > This should checkout all the files from the svn project <yourproject>. You > should now have a directory in CC's project directory named <yourproject>. > Did this work successfully? > > If so, change directory into your <yourproject> and kick off the ant script > using the same target you intend CC to use. > Did this work successfully? > > Here's another thought that might not be svn related: > 1. Perhaps you installed CC as root and so all of CC's files and directories > are owned by root. If CC is not running as root then you would not be able > to copy or checkout files into CC directories. By the way, you don't want > to run CC under 'root', very bad idea. > > I think at this point its most likely SVN related so let's make sure that > world is working as expected and then we can move on from there. > > Hang in there, you are probably very close to getting this thing working. > > Take care, > Mark > > -----Original Message----- > From: Ian McLean [mailto:[email protected]] > Sent: Wednesday, May 06, 2009 5:26 PM > To: [email protected] > Subject: Re: [Cruisecontrol-user] svn modifcation issues > > Mark, > > First off thanks, you've cleared up a couple CC concepts I just wasn't > getting in your earlier response. > > I've been working on this and I'm not able to get the svn > modificationset to run properly. It fails as follows: > > [cc]May-06 18:01:37 SVN - Error executing svn log command svn > log --non-interactive --xml -v -r > '"{2009-05-06T21:02:00Z}":"{2009-05-06T22:01:37Z}"' --no-auth-cache > --username imclean --password naelcmi > INFO | jvm 1 | 2009/05/06 18:01:37 | java.io.IOException: Cannot > run program "svn" (in directory "projects\CreativeManagerAIR"): > CreateProcess error=2, The system cannot find the file specified > INFO | jvm 1 | 2009/05/06 18:01:37 | at > java.lang.ProcessBuilder.start(Unknown Source) > INFO | jvm 1 | 2009/05/06 18:01:37 | at > java.lang.Runtime.exec(Unknown Source) > INFO | jvm 1 | 2009/05/06 18:01:37 | at > net.sourceforge.cruisecontrol.util.CruiseRuntime.exec(CruiseRuntime.java:22) > INFO | jvm 1 | 2009/05/06 18:01:37 | at > net.sourceforge.cruisecontrol.util.Commandline.execute(Commandline.java:599) > INFO | jvm 1 | 2009/05/06 18:01:37 | at > net.sourceforge.cruisecontrol.sourcecontrols.SVN.execHistoryCommand(SVN.java > :447) > INFO | jvm 1 | 2009/05/06 18:01:37 | at > net.sourceforge.cruisecontrol.sourcecontrols.SVN.getModifications(SVN.java:2 > 64) > INFO | jvm 1 | 2009/05/06 18:01:37 | at > net.sourceforge.cruisecontrol.ModificationSet.retrieveModificationsAsElement > (ModificationSet.java:276) > INFO | jvm 1 | 2009/05/06 18:01:37 | at > net.sourceforge.cruisecontrol.Project.getModifications(Project.java:424) > INFO | jvm 1 | 2009/05/06 18:01:37 | at > net.sourceforge.cruisecontrol.Project.build(Project.java:198) > INFO | jvm 1 | 2009/05/06 18:01:37 | at > net.sourceforge.cruisecontrol.Project.execute(Project.java:147) > INFO | jvm 1 | 2009/05/06 18:01:37 | at > net.sourceforge.cruisecontrol.ProjectConfig.execute(ProjectConfig.java:402) > INFO | jvm 1 | 2009/05/06 18:01:37 | at > net.sourceforge.cruisecontrol.ProjectWrapper.run(ProjectWrapper.java:69) > INFO | jvm 1 | 2009/05/06 18:01:37 | at > java.lang.Thread.run(Unknown Source) > INFO | jvm 1 | 2009/05/06 18:01:37 | Caused by: > java.io.IOException: CreateProcess error=2, The system cannot find the > file specified > INFO | jvm 1 | 2009/05/06 18:01:37 | at > java.lang.ProcessImpl.create(Native Method) > INFO | jvm 1 | 2009/05/06 18:01:37 | at > java.lang.ProcessImpl.<init>(Unknown Source) > INFO | jvm 1 | 2009/05/06 18:01:37 | at > java.lang.ProcessImpl.start(Unknown Source) > > It just can't seem to find the checkout I'm specifying. Either that or > the svn plugin itself is perhaps unbound? > > Having moved on, I was able to get this working using an antbootstrapper > and a filesystem modificationset. The antbootstrapper calls ant ant > script to update the checkout. This seems to work fine even though the > checkout should probably be using svnbootstrapper as it isn't a plain > filesystem project. This poses another question: Is there a reason why > an svnbootstrapper should be used instead of antbootstrapper when the > latter appears to work in cases of svn as well? > > There is however an issue with the filesystem modification set. Whereas > it does report changes and trigger the build, it reports changes made in > .svn folders as well. Its my assumption that is precisely why an svn > modification set exists - but sadly I cannot get it to work. > > My config.xml as it stands is this: > http://pastebin.com/m26f60647 > > I've commented out the svn modificationset call that generated the error > above. > > Any help is greatly appreciated as always :) > > -Ian > > Mark Thias wrote: > >> Hello Ian, >> >> The bootstrapper will not update an entire directory but will simply >> checkout/update a single file which can act somewhat as a control >> point for kicking off other scripts. For example you might want to >> use an ant script such as build_cc.xml as your bootstrapper file. >> Within this script, you could include an ant task to perform an SVN >> update to refresh your project directory. Depending on how you setup >> SVN it might look something like the below where username and password >> are your SVN username and password. >> >> <bootstrappers> >> <svnbootstrapper username="ian" >> password="passwordforian" >> file="projects/${project.name >> <http://project.name>}/build_cc.xml" >> >> localWorkingCopy="projects/${project.name <http://project.name>}" /> >> </bootstrappers> >> >> In your case build_cc.xml might be "air_ant_script.xml". >> >> What you have in config.xml for "modificationset" might be correct, I >> just haven't used a local SVN copy in awhile so can't verify. >> >> "modificationset" checks your SVN project for changes and if it finds >> one will kick-off what you define in "schedule". For example the >> following: >> >> <modificationset quietperiod="${quiet.period}"> >> <svn RepositoryLocation="${svn.project}" >> username="${svn.user}" >> password="${svn.password}"/> >> </modificationset> >> >> An finally, the kicking off of your script. You don't seem to have a >> "target" in your ant script within your "schedule" which means it will >> just kick off whatever you defined as the default in your ant script, >> which is perfectly fine. Important thing to remember though is that >> your ant script is responsible for making the SVN call to update the >> project. CC does not do this for you. >> >> <schedule interval="60"> >> <ant anthome="${ant.home}" >> buildfile="projects/${project.name >> <http://project.name>}/build_cc.xml" >> target="deploy"/> >> </schedule> >> >> Important thing to remember though is that your ant script is >> responsible for making the SVN call to update the project. CC does >> not do this for you. So you will need something like the below in >> your "air_ant_script.xml" or whatever becomes your bootstrap file. >> >> <target name="svn-update" description="Update from Subversion"> >> <exec executable="svn"> >> <arg line="update"/> >> </exec> >> </target> >> >> The above updates the project fine because build_cc.xml is in the root >> directory of the project so it just updates everything from the root down. >> >> Hope that helps, >> Mark >> >> >> On Tue, May 5, 2009 at 5:09 PM, Ian McLean <[email protected] >> <mailto:[email protected]>> wrote: >> >> Hi Everyone, >> >> I'm a new CruiseControl user and have been fighting with this >> issue most >> of the day. I want to have builds triggered by commits to my >> repository. >> >> Based on what I've read I'm attempting to set up an svnbootstrapper to >> update a locally checked out directory. This is combined with a >> modifcationset that checks for changes in that directory (post update) >> and allows the ant script to run if changes are to be found. >> >> This is what I have currently: >> http://pastebin.com/m665bbba5 >> >> And this is the log that is generated: >> http://pastebin.com/m4422c6aa >> >> The specific error is this: >> Caused by: java.io.IOException: Cannot run program "svn" (in directory >> "projects\CreativeManagerAIR"): CreateProcess error=2, The system >> cannot >> find the file specified >> >> I'm not quite sure if the svn plugin cannot be found or if the project >> cannot be found. The relative path is correct, and an absolute path >> results in the same error so I'm at a loss. >> >> Any help is much appreciated. >> >> Thanks, >> -Ian >> >> >> > ---------------------------------------------------------------------------- > -- > >> The NEW KODAK i700 Series Scanners deliver under ANY >> circumstances! Your >> production scanning environment may not be a perfect world - but >> thanks to >> Kodak, there's a perfect scanner to get the job done! With the NEW >> KODAK i700 >> Series Scanner you'll get full speed at 300 dpi even with all image >> processing features enabled. http://p.sf.net/sfu/kodak-com >> _______________________________________________ >> Cruisecontrol-user mailing list >> [email protected] >> <mailto:[email protected]> >> https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user >> >> >> ------------------------------------------------------------------------ >> >> >> > ---------------------------------------------------------------------------- > -- > >> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your >> production scanning environment may not be a perfect world - but thanks to >> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK >> > i700 > >> Series Scanner you'll get full speed at 300 dpi even with all image >> processing features enabled. http://p.sf.net/sfu/kodak-com >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Cruisecontrol-user mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user >> >> > > > ---------------------------------------------------------------------------- > -- > The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK > i700 > Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > Cruisecontrol-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user > Internal Virus Database is out of date. > Checked by AVG - www.avg.com > Version: 8.0.237 / Virus Database: 270.11.9/1989 - Release Date: 03/07/09 > 18:43:00 > > > ------------------------------------------------------------------------------ > The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 > Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > Cruisecontrol-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user > > ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ Cruisecontrol-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ Cruisecontrol-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user