Deploying a test web app for each GitHub pull request

蹲街弑〆低调 提交于 2020-01-05 04:30:28

问题


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.

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.


回答1:


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

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

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.



来源:https://stackoverflow.com/questions/37175419/deploying-a-test-web-app-for-each-github-pull-request

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!