You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by fmdano <fm...@gmail.com> on 2012/01/06 20:16:52 UTC

update dev and test servers from SVN

Hey all,
right now I am thinking about using a post-commit hook script to
update my dev server when a developer checks in changes.
I want to know how the test server could be updated from svn after
some testing has been done and a tag of a release has been created?
Would the best way to update the test server from a tag be to export
the tag into the existing test server folder and over write the code
in there, and hot have the test server be a checked out copy, or can
you use a tag to update the test server if it is a checked out working
copy?

any ideas about how to do this would be greatly appreciated.

Dan

Re: update dev and test servers from SVN

Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag fmdano,
am Montag, 9. Januar 2012 um 14:40 schrieben Sie:

> Ok, so CI is the best approach, but is there a way or an approach that
> just uses SVN? can you use a tag and update a test server via an
> update, or do you have to use export and export over the existing
> code? Is there an easy way to do this where the test server code can
> be a working copy checked out of SVN, or does it need to be just code
> and use an export?

This was answered, too:

http://subversion.apache.org/faq.html#website-auto-update

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail:Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon.............030-2 1001-310
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hanover HRB 207 694 - Geschäftsführer: Andreas Muchow


Re: update dev and test servers from SVN

Posted by fmdano <fm...@gmail.com>.
Thanks Ryan...i thought using export would be a bad idea...but using
update was something I thought about later. Plus, i'll take a look at
notify mirror.

Dna

On Jan 9, 12:53 pm, Ryan Schmidt <su...@ryandesign.com>
wrote:
> On Jan 9, 2012, at 07:40,fmdanowrote:
>
> > Ok, so CI is the best approach, but is there a way or an approach that
> > just uses SVN? can you use a tag and update a test server via an
> > update, or do you have to use export and export over the existing
> > code? Is there an easy way to do this where the test server code can
> > be a working copy checked out of SVN, or does it need to be just code
> > and use an export?
>
> Sure, either way. Actually I'd be skeptical about exporting on top of an existing directory, and would recommend updating a working copy instead. You haven't said what kind of dev and test servers these are -- I've been assuming so far you're talking about web site development. That may affect your choice of script. But another script to look into is SVN::Notify::Mirror.
>
> http://search.cpan.org/perldoc?SVN::Notify::Mirror
>
> The idea of this script is that by just creating tags in your repository that follow a certain naming pattern (that you define), code gets promoted to the dev or test or live environments. Developers never need (and never get) passwords or access to the dev or test or live environment servers.

Re: update dev and test servers from SVN

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jan 9, 2012, at 07:40, fmdano wrote:

> Ok, so CI is the best approach, but is there a way or an approach that
> just uses SVN? can you use a tag and update a test server via an
> update, or do you have to use export and export over the existing
> code? Is there an easy way to do this where the test server code can
> be a working copy checked out of SVN, or does it need to be just code
> and use an export?

Sure, either way. Actually I'd be skeptical about exporting on top of an existing directory, and would recommend updating a working copy instead. You haven't said what kind of dev and test servers these are -- I've been assuming so far you're talking about web site development. That may affect your choice of script. But another script to look into is SVN::Notify::Mirror.

http://search.cpan.org/perldoc?SVN::Notify::Mirror

The idea of this script is that by just creating tags in your repository that follow a certain naming pattern (that you define), code gets promoted to the dev or test or live environments. Developers never need (and never get) passwords or access to the dev or test or live environment servers.



Re: update dev and test servers from SVN

Posted by fmdano <fm...@gmail.com>.
Ok, so CI is the best approach, but is there a way or an approach that
just uses SVN? can you use a tag and update a test server via an
update, or do you have to use export and export over the existing
code? Is there an easy way to do this where the test server code can
be a working copy checked out of SVN, or does it need to be just code
and use an export?
I don't know if we here have the resources (mainly time) to research
and implement a CI, so thought i'd first check how we might use SVN.
Our current process is someone copies the code from the checked out
working copy which is dev and pastes the files into the test server
area. I don't think this is a good way to do it at all, especially
since i thought that copying working copy files would bring in the
copy the hidden .svn folder, don't think that is what we want.

If you don't have any good ideas about how to use SVN to do what a CI
will do, no problem, no harm in asking :)

thanks
Dan

RE: update dev and test servers from SVN

Posted by Bob Archer <Bo...@amsi.com>.
> On Fri, Jan 6, 2012 at 14:16, fmdano <fm...@gmail.com> wrote:
> > Hey all,
> > right now I am thinking about using a post-commit hook script to
> > update my dev server when a developer checks in changes.
> > I want to know how the test server could be updated from svn after
> > some testing has been done and a tag of a release has been created?
> > Would the best way to update the test server from a tag be to export
> > the tag into the existing test server folder and over write the code
> > in there, and hot have the test server be a checked out copy, or can
> > you use a tag to update the test server if it is a checked out working
> > copy?
> >
> > any ideas about how to do this would be greatly appreciated.
> 
> Usually this is done via a Continuous Integration server like CruiseControl,
> Jenkins, TeamCity, etc. They'll check out your code, run whatever build scripts
> & tests you define, deploy (if you have a script/command for it to run), and
> create a tag (usually you only do this on success). You can also configure them
> to send email/RSS/twitter/SMS/whatever notifications on various events, and
> usually get a web dashboard to monitor the status of your environment.

Agreed. This is the way to go. Even though you could do it as a post commit hook. You have much more flexibility with build scripts and cc servers and you can run them on a separate machine so stuff scales better.

BOb


Re: update dev and test servers from SVN

Posted by Andy Levy <an...@gmail.com>.
On Fri, Jan 6, 2012 at 14:16, fmdano <fm...@gmail.com> wrote:
> Hey all,
> right now I am thinking about using a post-commit hook script to
> update my dev server when a developer checks in changes.
> I want to know how the test server could be updated from svn after
> some testing has been done and a tag of a release has been created?
> Would the best way to update the test server from a tag be to export
> the tag into the existing test server folder and over write the code
> in there, and hot have the test server be a checked out copy, or can
> you use a tag to update the test server if it is a checked out working
> copy?
>
> any ideas about how to do this would be greatly appreciated.

Usually this is done via a Continuous Integration server like
CruiseControl, Jenkins, TeamCity, etc. They'll check out your code,
run whatever build scripts & tests you define, deploy (if you have a
script/command for it to run), and create a tag (usually you only do
this on success). You can also configure them to send
email/RSS/twitter/SMS/whatever notifications on various events, and
usually get a web dashboard to monitor the status of your environment.

Re: update dev and test servers from SVN

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jan 6, 2012, at 13:16, fmdano wrote:

> right now I am thinking about using a post-commit hook script to
> update my dev server when a developer checks in changes.

I think perhaps you are asking for this:

http://subversion.apache.org/faq.html#website-auto-update