Ask Your Question

Git checkout to seperate folders

asked 2013-05-25 05:26:16 -0600

joewoodhouse gravatar image


We are hoping to use puppetlabs and vcsrepo to manage deployment of some websites we run.

On the server under each sites directory, we like to manage each site with this folder structure:

releases/ - folder of all releases (git checkouts) releases/2012-05-25-10-20-11 - a particular release current - a symlink to the current release

Would it be possible to simulate this sort of thing using vcsrepo? i.e. when a new version of the repository is available in git, clone it to a new folder with a particular name, and update a symlink. From the documentation I'm struggling to see ... (more)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-05-28 23:34:02 -0600

jgoldschrafe gravatar image

There's no way to do what you're asking with the vcsrepo type. It's designed to manage the contents of a single directory, not the contents of an arbitrary number of directories. Most Puppet types won't handle what you're looking to do in that way.

Daniel is right, though, that what you're trying to do is kind of antithetical to the idea of using Git in the first place. The entire point of revision control is that you don't need to manually create complicated pathing structures to perform common operations like switching tags or ... (more)

edit flag offensive delete link more

answered 2013-05-27 05:50:01 -0600

Sounds you are misusing git as you could switch the version with vcsrepo. Having dedicated checkouts and link to the latest one is the approach you would use without git.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-05-25 05:26:16 -0600

Seen: 185 times

Last updated: May 28 '13