Is there a way to use Jenkins with Github Pull Requests?

后端 未结 5 1010
情书的邮戳
情书的邮戳 2021-01-31 19:23

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?

相关标签:
5条回答
  • 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.

    0 讨论(0)
  • 2021-01-31 19:59

    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.

    0 讨论(0)
  • 2021-01-31 19:59

    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

    0 讨论(0)
  • 2021-01-31 20:05

    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.

    0 讨论(0)
  • 2021-01-31 20:07

    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.

    0 讨论(0)
提交回复
热议问题