Search code examples
ftpcontinuous-integrationzipnant

How do I unzip remotely during the automated deployment to our QA environment?


I'm trying to figure out a way to automate the deployment to our QA environment. The problem is that our release is quite big, so needs to be Zipped, FTP'd and then Unzipped on the QA server. I'm not sure how best to unzip remotely.

I can think of a few options, but none of them sound right:

  • Use PsExec to execute a remote commandline call on the QA server to unzip the release.
  • Host a web service on the QA server that unzips the release and copies it to the right place. This service can be called by our release when it's done uploading the files.
  • Host a windows service on the QA server that monitors a file location and does the unzipping.

None of these are pretty though. I wonder how others have solved this problem?

PS: we use CruiseControl.NET to execute a NAnt script that does the building, zipping and FTP.


Solution

  • Instead of compressing and un-compressing, you can use a tool like rsync; which can transparently compress data during file transfer. The -z option tells rsync to use compression.

    But I assume you are in a Windows environment, in which case you could use cwRsync (which is "rsync for Windows").

    Depending on your access to the QA box this might not be a viable solution. You'll need to:

    • install the cwRsync server on the remote machine and
    • allow the traffic through any firewalls.