support for the phabricator plugin
This plugin integrates Jenkins with Phabricator's code review and CI systems. NOTE: The plugin also provides a wrapper. The future of that is unclear time at this time so no jjb support is added. Change-Id: I36727445a00ab07799ab8d8263340d87c8a13be2
This commit is contained in:
parent
a18d39a716
commit
55e857af0f
@ -5191,6 +5191,48 @@ def hipchat(parser, xml_parent, data):
|
||||
data['complete-message'])
|
||||
|
||||
|
||||
def phabricator(parser, xml_parent, data):
|
||||
"""yaml: phabricator
|
||||
Integrate with `Phabricator <http://phabricator.org/>`_
|
||||
|
||||
Requires the Jenkins :jenkins-wiki:`Phabricator Plugin
|
||||
<Phabricator+Plugin>`.
|
||||
|
||||
:arg bool comment-on-success: Post a *comment* when the build
|
||||
succeeds. (optional)
|
||||
:arg bool uberalls-enabled: Integrate with uberalls. (optional)
|
||||
:arg str comment-file: Include contents of given file if
|
||||
commenting is enabled. (optional)
|
||||
:arg int comment-size: Maximum comment character length. (optional)
|
||||
:arg bool comment-with-console-link-on-failure: Post a *comment*
|
||||
when the build fails. (optional)
|
||||
|
||||
Example:
|
||||
|
||||
.. literalinclude::
|
||||
/../../tests/publishers/fixtures/phabricator001.yaml
|
||||
:language: yaml
|
||||
"""
|
||||
|
||||
root = XML.SubElement(xml_parent,
|
||||
'com.uber.jenkins.phabricator.PhabricatorNotifier')
|
||||
|
||||
if 'comment-on-success' in data:
|
||||
XML.SubElement(root, 'commentOnSuccess').text = str(
|
||||
data.get('comment-on-success')).lower()
|
||||
if 'uberalls-enabled' in data:
|
||||
XML.SubElement(root, 'uberallsEnabled').text = str(
|
||||
data.get('uberalls-enabled')).lower()
|
||||
if 'comment-file' in data:
|
||||
XML.SubElement(root, 'commentFile').text = data.get('comment-file')
|
||||
if 'comment-size' in data:
|
||||
XML.SubElement(root, 'commentSize').text = str(
|
||||
data.get('comment-size'))
|
||||
if 'comment-with-console-link-on-failure' in data:
|
||||
XML.SubElement(root, 'commentWithConsoleLinkOnFailure').text = str(
|
||||
data.get('comment-with-console-link-on-failure')).lower()
|
||||
|
||||
|
||||
class Publishers(jenkins_jobs.modules.base.Base):
|
||||
sequence = 70
|
||||
|
||||
|
@ -190,6 +190,7 @@ jenkins_jobs.publishers =
|
||||
maven-deploy=jenkins_jobs.modules.publishers:maven_deploy
|
||||
naginator=jenkins_jobs.modules.publishers:naginator
|
||||
performance=jenkins_jobs.modules.publishers:performance
|
||||
phabricator=jenkins_jobs.modules.publishers:phabricator
|
||||
pipeline=jenkins_jobs.modules.publishers:pipeline
|
||||
plot=jenkins_jobs.modules.publishers:plot
|
||||
pmd=jenkins_jobs.modules.publishers:pmd
|
||||
|
10
tests/publishers/fixtures/phabricator001.xml
Normal file
10
tests/publishers/fixtures/phabricator001.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<publishers>
|
||||
<com.uber.jenkins.phabricator.PhabricatorNotifier>
|
||||
<commentOnSuccess>false</commentOnSuccess>
|
||||
<uberallsEnabled>false</uberallsEnabled>
|
||||
<commentWithConsoleLinkOnFailure>false</commentWithConsoleLinkOnFailure>
|
||||
</com.uber.jenkins.phabricator.PhabricatorNotifier>
|
||||
</publishers>
|
||||
</project>
|
5
tests/publishers/fixtures/phabricator001.yaml
Normal file
5
tests/publishers/fixtures/phabricator001.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
publishers:
|
||||
- phabricator:
|
||||
comment-on-success: false
|
||||
uberalls-enabled: false
|
||||
comment-with-console-link-on-failure: false
|
6
tests/publishers/fixtures/phabricator002.xml
Normal file
6
tests/publishers/fixtures/phabricator002.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<publishers>
|
||||
<com.uber.jenkins.phabricator.PhabricatorNotifier/>
|
||||
</publishers>
|
||||
</project>
|
2
tests/publishers/fixtures/phabricator002.yaml
Normal file
2
tests/publishers/fixtures/phabricator002.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
publishers:
|
||||
- phabricator
|
12
tests/publishers/fixtures/phabricator003.xml
Normal file
12
tests/publishers/fixtures/phabricator003.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<publishers>
|
||||
<com.uber.jenkins.phabricator.PhabricatorNotifier>
|
||||
<commentOnSuccess>false</commentOnSuccess>
|
||||
<uberallsEnabled>false</uberallsEnabled>
|
||||
<commentFile>.foo</commentFile>
|
||||
<commentSize>137</commentSize>
|
||||
<commentWithConsoleLinkOnFailure>false</commentWithConsoleLinkOnFailure>
|
||||
</com.uber.jenkins.phabricator.PhabricatorNotifier>
|
||||
</publishers>
|
||||
</project>
|
7
tests/publishers/fixtures/phabricator003.yaml
Normal file
7
tests/publishers/fixtures/phabricator003.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
publishers:
|
||||
- phabricator:
|
||||
comment-on-success: false
|
||||
uberalls-enabled: false
|
||||
comment-file: '.foo'
|
||||
comment-size: 137
|
||||
comment-with-console-link-on-failure: false
|
Loading…
x
Reference in New Issue
Block a user