diff --git a/jenkins_jobs/modules/publishers.py b/jenkins_jobs/modules/publishers.py index b5470f9cd..7dc796436 100644 --- a/jenkins_jobs/modules/publishers.py +++ b/jenkins_jobs/modules/publishers.py @@ -2942,6 +2942,20 @@ def git(parser, xml_parent, data): handle_entity_children(note['note'], xml_note, note_mappings) +def github_notifier(parser, xml_parent, data): + """yaml: github-notifier + Set build status on Github commit. + Requires the Jenkins `Github Plugin. + `_ + + Example: + + .. literalinclude:: ../../tests/publishers/fixtures/github-notifier.yaml + """ + XML.SubElement(xml_parent, + 'com.cloudbees.jenkins.GitHubCommitNotifier') + + def build_publisher(parser, xml_parent, data): """yaml: build-publisher This plugin allows records from one Jenkins to be published diff --git a/setup.py b/setup.py index 3cbe5efc1..35421995e 100644 --- a/setup.py +++ b/setup.py @@ -140,6 +140,7 @@ setuptools.setup( 'fingerprint=jenkins_jobs.modules.publishers:fingerprint', 'ftp=jenkins_jobs.modules.publishers:ftp', 'git=jenkins_jobs.modules.publishers:git', + 'github-notifier=jenkins_jobs.modules.publishers:github_notifier', ('groovy-postbuild=jenkins_jobs.modules.publishers:' 'groovy_postbuild'), 'html-publisher=jenkins_jobs.modules.publishers:html_publisher', diff --git a/tests/publishers/fixtures/github-notifier.xml b/tests/publishers/fixtures/github-notifier.xml new file mode 100644 index 000000000..a4501b40c --- /dev/null +++ b/tests/publishers/fixtures/github-notifier.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/publishers/fixtures/github-notifier.yaml b/tests/publishers/fixtures/github-notifier.yaml new file mode 100644 index 000000000..adeb874e5 --- /dev/null +++ b/tests/publishers/fixtures/github-notifier.yaml @@ -0,0 +1,2 @@ +publishers: + - github-notifier