On Jun 24, 3:11 am, Tim Diggins <[EMAIL PROTECTED]>
wrote:
> Hi Rachel -
>
> just out of interest (because I'm doing the same kind of thing ,
> though I've decided (for now anyway) to make the war remotely (on the
> server... yes, uses up lots of server CPU for a bit, but is much
> quicker))

My current deployment process is to build a WAR, deploy it to staging,
test, then deploy the same WAR to production.  I could, and may in
future, change this to check out code to the server and build there,
but for now I want to make only the one change, from a human-managed
process to a scripted one.

>
> why do you need to do ~/dist/test.jar... if you do a cap deploy (or
> whatever) from the same directory that you run your ant from
> (typically the root dir of your project ) and that makes sense (so
> you've got an ant file to make your war (build.xml) next to your
> Capfile ) then you can just use relative paths...

I don't need to do it that way, and I doubt most people would. I was
testing stuff, playing around, and I noticed this so I reported it.
None of the paths I listed in my samples are real ;)  My final version
will use the relative path to the build directory.

>
> and of course the cap file can (use an ant task to...) compile your
> code & tests & build war before deploying if you want...
>
> and I think you do want, because the beauty of cap is that the normal
> logic is to check out a fresh copy before you deploy (stops the terror
> of local untracked mods creeping into deployment)
> ... otherwise you might as well be using ant...

heh, we do use ant to build... never heard of using it to deploy, is
this what you mean?  got any links about that?

>
> I ended up using base capistrano (no rails-based recipes) for my
> deployment scripts - which is a shame - but I need more docs of those.
> I guess I should read the code.
>
> just some thoughts
>
> Tim
>
> > upload(ENV['HOME']+'/dist/test.jar', 'test.jar')
>
> > Or, if you want to be extra paranoid:
>
> > upload(File.join(ENV['HOME'], 'dist', 'test.jar'), 'test.jar')
>
> > (I think File.join will use backslashes on Windows. Not sure.)

This would certainly be better if someone has to use their home
directory in the build process for some reason!  I don't, it was just
an example.

>
> > > * using scp, you can specify ~/ as the remote directory; using ftp
> > > this fails
> > >  upload( "dist/instruct.jar", "~/" ) # sftp does not like the twiddle
> > >  # upload via sftp failed on edison: Net::SFTP::StatusException
> > > (Net::SFTP::StatusException open . (4, "failure"))
> > >  upload( "dist/instruct.jar", "~/", :via => :scp ) # works
>
> > > * probably the most common case, however, works just fine with both
> > > methods.
> > >  upload( "dist/instruct.jar", "instruct.jar" ) # works
> > >  upload( "dist/instruct.jar", "instruct.jar", :via => :scp ) # works
>
> > I'm guessing that when entirely relative paths are specified, it's relative
> > to the home directory?

It seems to be relative to the directory cap is running in, but it may
possibly be relative to the directory the capfile is in.  I haven't
tried running a capfile in a different directory to test that.

Rachel
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to