php - Hudson + gitolite + virtual host on staging server

878

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.

774

Answer

Solution:

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.

People are also looking for solutions to the problem: php - Group/Merge rows from two 2d arrays based on 3 identifying columns and fill missing column values with null

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.