This plugin provides Phabricator integration with Jenkins. It allows Jenkins to report build status and coverage information over Harbormaster (or via comments if Harbormaster is not enabled).
Before the plugin can be used, a few configuration steps on your Phabricator and Jenkins instances need to be completed.
In this section, you'll create a bot user in Phabricator and generate a Conduit API token. If you already have a bot user and a Conduit API token, skip to the "Jenkins Setup Section".
https://ci.example.com/configure
with your base Jenkins URL in place of "ci.example.com".https://phabricator.example.com
.Now that Jenkins and Phabricator are configured you can configure your Jenkins job and Harbormaster.
DIFF_ID
in the Name field of the parameter.PHID
in the Name field of the second parameter. .phabricator-comment
file and enter the text you want Jenkins to add to the build status comment in Phabricator.
With Phabricator, Jenkins, and your Jenkins jobs configured it's time to configure a new Harbormaster build plan. This build plan will trigger the Jenkins job using a Herald rule that will be configured in the next section.
Navigate to https://phabricator.example/harbormaster/plan/
with your base Phabricator URL in place of phabricator.example
.
Click the New Build Plan button in the top right corner of the page.
Enter a name for the build plan in the Plan Name field. For these instructions, we'll use "test-example" as the build name.
Click the Create Build Plan button.
Click the Add Build Step button.
Click the Make HTTP Request step.
Use this template URI to fill in the URI field for the build plan: https://ci.example.com/buildByToken/buildWithParameters?job=test-example&DIFF_ID=${buildable.diff}&PHID=${target.phid}
Be sure to replace https://ci.example.com
with the URI of your Jenkins instance and test-example
with the name of your Jenkins job.
If your Jenkins instance is exposed to the internet, make sure to install the Build Token Root Plugin and fill in the token
parameter.
With the build plans created it's time to create a Herald Rule to trigger the plans. The steps below will configure a Herald Rule to trigger the build plans on Differential Revisions to your repository.
https://phabricator.example/herald/
with your base Phabricator URL in place of phabricator.example
.Try arc diff
-ing on your repo. If everything goes well, you should see Jenkins
commenting on your diff:
Now that you have build status and optionally coverage data set up, check out some advanced features.
Set up your Maven file according to https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial.
Start up Jenkins with the plugin installed:
mvn hpi:run
Open your browser to your local instance.
Please open all pull requests and issues against https://github.com/uber/phabricator-jenkins-plugin.
MIT Licensed
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。