Reputation: 2731
We have Gitlab server running in our office in ubuntu server. I'm doing auto deployment using post-receive hook from each repo. This is what I did,
GIT_WORK_TREE
and restart nginx server in same post-receive hook.Now I want to make this auto deployment through existing standard tools since with this way of deployment I need to configure all the repo so it will take lot of time again. What are other ways to do this auto deployment.
Production Server: ubuntu 14.04LTS, Production Webserver: nginx, local git server: gitlab.
UPDATE: I wanted to do this now because I had problem with gitlab shell as @Ciro Santilli explained. And I'm also doing git push production
as @Ciro Santilli answer's link mentioned after I had problem with gitlab shell. But all I wanted to do is what Gitlab_CI does, push to master branch
our production server should be updated. I'll try with Gitlab_CI but I wanted to know is there any other tool to do the same.
Upvotes: 2
Views: 7086
Reputation: 382802
EDIT: with the Custom Hooks feature, the old reasons given for not using hooks don't apply anymore if you have filesystem access. However, I'd still recommend using the CI because as it is:
.yaml
configuration inside the repositoryReasons for not using hooks before the Custom Hooks feature:
much as discussed at: Gitlab repository mirroring
Unless you specify more about your deployment other than you want to do it with Git, there is nothing GitLab specific about it and the answers will be the same as for the generic Git problem: Deploy a project using Git push
If you have more specific requirements, there might be a service that does what you want: https://github.com/gitlabhq/gitlabhq/tree/d7c50b4a95b5530ae0e2f5249cfd9a419dd940c6/app/models/project_services , but I would leave that for another more specific question.
Upvotes: 3