下面Admin list中填写github用户白名单,在白名单中的用户提交pull request,可以直接触发构建,没有在白名单中的,需要通过admin的确认;感受下官网的描述:
When a new pull request is opened in the project and the author of the pull request isn't whitelisted, builder will ask Can one of the admins verify this patch?. One of the admins can comment ok to test to accept this pull request for testing, test this please for one time test run and add to whitelist to add the author to the whitelist.
If an author of a pull request is whitelisted, adding a new pull request or new commit to an existing pull request will start a new build.
ok,配置完后点击保存;
第三步:配置jenkins任务
基本的配置跟之前的类似,我这里只提不同的地方:
1、源码管理
If you just want to build PRs, set refspec to +refs/pull/*:refs/remotes/origin/pr/*
If you want to build PRs and branches, set refspec to +refs/heads/*:refs/remotes/origin/* +refs/pull/*:refs/remotes/origin/pr/* (see note below about parameterized builds)
In Branch Specifier, enter ${sha1} instead of the default */master.
If you want to use the actual commit in the pull request, use ${ghprbActualCommit} instead of ${sha1}