如何使用 GITLAB 部署我的网站 [英] how deploy my sites with a GITLAB

查看:15
本文介绍了如何使用 GITLAB 部署我的网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有可能在带有 GIT 的产品服务器上部署(网站)?

让我解释一下:

我有一个在本地工作的团队,它使用 GIT,我们将在完成开发后部署在服务器 PREPROD 上,然后再部署在 PROD 服务器上?

提前谢谢你,

解决方案

你需要在 gitlab 中使用 webhook(与 with GitHub),以便从您的产品环境中触发 git pull.

How to setup Gitlab with post-receive hook?"中查看 Gitlab webhook 示例..p>

注意:webhook 不必在 php 中:您可以在 "Jenkins Gitlab Hook 插件".

I would like to know if there's possibility of deployment (Website) on a prod server with GIT?

Let me explain:

I have a team who work locally, it working with GIT, we would after completing the development, deploy on a server PREPROD and in a second time, Deploy on PROD server?

Thank you in advance,

解决方案

You would need, with gitlab, to use a webhook (same idea as with GitHub), in order to trigger a git pull from your prod environment.

See an example of a Gitlab webhook at "How to setup Gitlab with post-receive hook?".

Note: that webhook doesn't have to be in php: you can see more details and a different example in "Jenkins Gitlab Hook Plugin".

这篇关于如何使用 GITLAB 部署我的网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆