将代码从Git / Bitbucket更新到活服务器 [英] Update Code from Git/Bitbucket to live server
问题描述
有没有免费的服务?如何使用Git / Bitbucket进行更改?
是否可以通过某种可以与cronjob集成的API来实现? 你可以使用 BitBucket服务钩子。
它们在使用Bitbucket进行自动化部署,该文章使用 POST服务。
Bitbucket POSTs to您指定的服务URL。
每当用户推送到存储库时,服务都会收到POST
。
POST
有一个application / x-www-form-urlencoded
类型。类似于HTTP发布/订阅服务。
有效负载具有有效负载=
pr依赖于实际的有效载荷。有效负载是URL编码内容。
POST请求的主体包含有关更改源自的存储库的信息,最近提交的列表以及进行推送的用户。
关于GitHub,请参阅这个过程,它描述了如何使用 Post-receive 挂钩
How can i update my live server with the changes i made through Git/Bitbucket?
Is there any free service ?
Is it possible to do it with some kind of API which can be integrated with cronjob?
You could use the BitBucket service hooks.
They are illustrated in "Using Bitbucket for Automated Deployments", and that article uses the POST service.
Bitbucket POSTs to the service URL you specify.
The service receives anPOST
whenever user pushes to the repository.
The content header of thePOST
has anapplication/x-www-form-urlencoded
type.
This services behaves similarly to an HTTP publish/subscribe service.
The payload haspayload=
prepended to the actual payload. The payload is url encode content.The body of POST request contains information about the repository where the change originated, a list of recent commits, and the user that made the push.
Regarding GitHub, see this process which describes how to use the Post-receive hook
这篇关于将代码从Git / Bitbucket更新到活服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!