为每个GitHub拉取请求部署测试Web应用程序 [英] Deploying a test web app for each GitHub pull request

查看:352
本文介绍了为每个GitHub拉取请求部署测试Web应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当提交请求时,GitHub是否有可能触发新的测试部署?我希望它在服务器上创建一个新文件夹(首选Azure),以便测试URL(例如 http:/ / /testserver.com/PR602/ ),我们可以在拉取请求中引用。

Is it possible for GitHub to trigger a new test deployment when a pull request is submitted? I'd like for it to create a new folder on the server (Azure preferred) so that a test URL (e.g. http://testserver.com/PR602/) is generated that we can refer to in the pull request.

这将允许任何人测试拉取请求,而无需克隆回购,检查分支,并在当地建立。

This would allow anyone to test a pull request without having to clone the repo, check out the branch, and build it locally.

在我最初的研究中,我发现Travis CI可以部署所有分支机构,但我不清楚这将如何触发。我是否必须编写一个由拉请求Web钩子触发的自定义应用程序?我希望有人发现了一个更简单的方法。

In my initial research I found that Travis CI can deploy all branches, but I'm not clear how this would be triggered. Do I have to write a custom app that's triggered by pull request web hooks? I'm hoping someone has discovered a simpler method.

推荐答案


我必须编写一个自定义应用程序是由拉请求Web钩子触发的?

Do I have to write a custom app that's triggered by pull request web hooks?

是,或者找到其他人碰巧编写了您需要的确切webhook处理程序。

Yes, or find someone else who has happened to have written the exact webhook handler you need.

编写webhook处理程序并不是非常有用。如果您不想将其与当前应用程序集成,则可以使用 Flask 等微型框架只需几行代码即可完成此操作。

Writing a webhook handler isn't terribly much work. If you don't want to integrate it with your current app, you can use a micro-framework like Flask to do this in only a few lines of code.

这篇关于为每个GitHub拉取请求部署测试Web应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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