有没有办法将 Jenkins 与 Github Pull 请求结合使用?

发布于 2024-12-21 23:23:21 字数 73 浏览 1 评论 0原文

我希望 Jenkins 自动查找并运行属于开放拉取请求一部分的每个分支的测试套件。我还没有找到一些 Jenkins 插件,这可能吗?

I want Jenkins to automatically find and run the test suite for every branch that is part of an open pull request. Is this possible with some Jenkins plugin I have not found?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

傲影 2024-12-28 23:23:21

最近发布了 Jenkins — Github pull request 的新插件构建器

如果它的功能与罐头上所说的一样,那么它可能就是您想要的。

A new plugin has been released recently for Jenkins—Github pull request builder.

If it does what it says on the tin it's probably what you want.

遗忘曾经 2024-12-28 23:23:21

我发现 Jenkins Github 拉取请求构建器插件无法使用,因此我编写了一个小守护进程,用于将 Jenkins 作业与 PR 同步,然后将构建状态评论回每个 PR 的评论线程。您可以在这里找到它:https://github.com/percolate/jennifer

I found the Jenkins Github pull request builder plugin unusable, so I wrote a little daemon that synchronizes Jenkins jobs with PRs, then comments build status back to each PR's comment thread. You can find it here: https://github.com/percolate/jennifer

与之呼应 2024-12-28 23:23:21

一种可行的方法是,当分支“准备集成”并准备好进行测试时,您可以重命名该分支。

像 prep/my_feature 这样的命名约定。

然后在 Jenkins git 插件中,您可以配置您希望它在构建时查看的分支名称。您可以让它匹配“prep/*”。

我们曾经对所有功能分支执行此操作,使用“dev/”前缀来标记应该为其运行自动构建的功能分支。看起来效果很好。

One method that should work is you could rename the branch when it is "prepared for integration" and ready to be tested.

A naming convention like prep/my_feature.

Then in the Jenkins git plugin you can configure the branch names that you want it to look at for building. You can have it match 'prep/*'.

We used to do this for all our feature branches using a prefix of 'dev/' to mark the feature branches that should have the autobuild run for them. Seems to work pretty well.

赢得她心 2024-12-28 23:23:21

我做了类似的事情,但 Jennifer 是一个 Node.js 应用程序,而 Jently 是一个 Ruby 应用程序。您可以在 https://github.com/vaneyckt/Jently 找到它。

I did something similar, but where Jennifer is a node.js app, Jently is a Ruby app. You can find it at https://github.com/vaneyckt/Jently.

征﹌骨岁月お 2024-12-28 23:23:21

如果您碰巧使用 Cloudbees,他们会提供自己的拉取请求构建器插件。

https://wiki.cloudbees.com/bin/view/DEV /Github+Pull+Request+Validation

他们吹捧的相对于标准的优势 Jenkins Github 拉取请求生成器 的特点是它作为“租户隔离”程序,防止拉取请求中的代码窥探密码或 ssh 密钥。我认为这对于公共项目特别有用。

If you happen to be using Cloudbees, they offer their own pull request builder plugin.

https://wiki.cloudbees.com/bin/view/DEV/Github+Pull+Request+Validation

The advantages they tout over the standard Jenkins Github pull request builder is that it runs as a "tenant-isolate" program, preventing the code in the pull request from snooping around for passwords or ssh keys. I could see this being particularly useful for a public project.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文