views:

256

answers:

1

I have a Ubuntu server which I want to be my continous integration server (for the Zend Application based projects) and the staging server as well.

The team is pushing source files to the repository:

/home/git/repositories/testing.git

Then Hudson does the build, and the master branch is exported (maybe cloned is a better word) by git hudson plugin to:

/var/lib/hudson/jobs/test/workspace/

The workspace contains .git folder as well, which is not necessary on my staging website.

How do you set up virtual host to see the staging version of the content of the repository?

Does the virtual host point to the workspace, or shall I export the files to another directory?

What about the permissions and security? Hudson is the owner of all the workspace files. Do I have to do some post-build actions to set up access?

P.S. If this question is more apropriate to serverfault, please migrate.

+1  A: 

I would not point the staging server to the workspace. If your build fails (or during the build process) the staging environment might be corrupted and you don't have the chance for further testing. It is a better practice to have another build step or a post build step to deploy to the staging environment.

Peter Schuetze
Thank you. I found [this thread](http://stackoverflow.com/questions/160608/how-to-do-a-git-export-like-svn-export) very helpful too.
takeshin