views:

58

answers:

2

I am using hudson as my continuous integration tool. I need to download from my svn a zip file.

It gives me the following error -- /somedir/*.zip refers to a file, not a directory! I know that.

Is it not possible to check out a zip file.

Once that is done I would like to run a script that extracts it, and sets up a directory structure. It is a must that download zip file, no way around it.

Any ideas?

A: 

Why don't your refer to the folder containing the zip in your Hudson setup? After that trigger a script or Maven goal or Ant task that does the unzipping etc.

Instead of checking out the zip file checkout the folder containing the zip file. Configure a Build in Hudson which checkouts your folder and triggers a script.

See the "Shell Scripts and Windows Batch Commands" part of the following document : http://wiki.hudson-ci.org/display/HUDSON/Building+a+software+project

Timo Westkämper
so no way to check out a *.zip file?
garbagecollector
There is a way to checkout a zip file like I described it, but I guess not to treat the remote zip file as an alias to your project.
Timo Westkämper
can you explain the trigger a script part?
garbagecollector
@garbagecollector, did you fix your issues?
Timo Westkämper
yes, i have thanks!
garbagecollector
+1  A: 

As several people already mentioned you can't check out a single file from subversion. It also does not make sense to put a zip file into subversion in the first place. That would be like putting a binary into subversion.

However, there are at least two things that might help you.

  1. For triggering the build, go to the advanced settings for subversion in your job and put your zip name into the include region option. This way your build will be triggered only if the zip changed.
  2. use the M2 Extra Steps Plugin for extra build steps before and after the main build step for a maven job. This way you can create a before step (execute shell for Linux or execute Windows batch command) to extract your zip.
Peter Schuetze
Thanks for the help that fixed the issue. :) or least gives me options to solve it.
garbagecollector