manbetx客户端打不开webhooks部署主/生产 [英] GitLab webhooks to deploy master / production

查看:254
本文介绍了manbetx客户端打不开webhooks部署主/生产的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在运行Plesk的服务器上设置了一个gitlab,用于管理客户帐户.

I have set up a gitlab on my server running with Plesk which I use to manage my clients accounts.

我的一些客户有特殊的开发要求,所以我认为GitLab是解决一些问题的好方法.

Some of my clients have special development requests so I thought GitLab would be a great way to resolve a few issues.

但是.我需要做的是:

当我为客户项目创建git repo时,我在git中添加了一个名为hooks的文件夹.目录.里面有一个名为site.conf

When I create a git repo for a clients project I add a folder named hooks in the git . directory. and inside that I would like to have a file called site.conf

在这种情况下,我想到了这样的事情: stage_dir =/var/www/vhosts//subdomains/stage..no stage_production =/var/www/vhosts//httpdocs/

In this Im thinking of something like this: stage_dir=/var/www/vhosts//subdomains/stage..no stage_production=/var/www/vhosts//httpdocs/

在该项目中,我将为 http://localhost:7900 设置一个Webhooks. 对于我创建的每个存储库,这都是相同的,对于每个项目,都使用site.conf个人.因此,当我推送到舞台时,所有的舞台文件都将被复制/同步到stage_dir变量中,依此类推进行生产.

In the project I would set up a webhooks for http://localhost:7900 This would be the same for every repo I create, with the site.conf individual for every project. So when I push to stage, all the stage files get copied / rsynced into the stage_dir variable, and so forth for the production.

我知道那里有类似的解决方案,但是我一直找不到它们的任何示例.我的红宝石技能还不够好,可以从头开始做这件事,因此我需要研究一下才能完成这项工作.如果您知道这样的话,谁能帮我吗?

I know there are similar solutions out there, but I have been unable to find any examples of them. My ruby skills arent good enough to do this from scratch, so I need something to look at to make this work. Can anyone help me out if you know of anything like this?

推荐答案

我实际上在运行与您相同的配置,并且还尝试开发一种类似的方法,使我可以将本地更改部署到客户站点(分期,生产等.)

I'm actually running the same configuration as you, and also try to develop a such thing that should allow me to deploy my local changes to my clients sites (staging, prod, etc ..)

实际上,我写的脚本可以正常工作,但是过了一段时间后就停止工作了,我现在不知道为什么.我在并行"论坛上打开了一个主题,以寻求有关该主题的帮助.如果您对此感兴趣,也许可以尝试使用我的脚本,并帮助我调试脚本的最后一部分,然后再对其进行改进. 我不是一个优秀的Shell脚本开发人员,因此实际上它们有很多可以改进的地方,但是在其完全起作用之前要做的第一件事就是修复

Actually, i wrote a script that works fine, but stop working after some time, and i don't know why for now. I opened a topic on the parallels forum to claim some help about it. If you are interested in, maybe that you could try my script on your side, and help me to debug the last part of it, and maybe then, improve it. I'm not a good shell script developer, so they are a lot of things that we could improve actually, but the first thing to do before it completely works, is to fix the Plesk Gitlab behaviour i've explained one the forum.

我使用的 Gitlab部署脚本可以在我的GitHub上找到.

The Gitlab deploy script i use can be found on my GitHub.

如果您对此问题有任何建议或解决方法,请随时向我发送一些反馈或请求请求.

Do not hesitate to send me some feedbacks, or some pull request if you have any suggestion or fixes for this issue.

注意:要恢复,并行论坛上解释的问题是Plesk和Gitlab之间的连接会在一段时间后停止工作,原因尚不明.

Note : To resume, the issue explained on the parallels forum is that connections between Plesk and Gitlab stop working after some time, for an unknown reason yet.

这篇关于manbetx客户端打不开webhooks部署主/生产的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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