From 4400ed4f88e06ec67851905a9d9ff6856aa6b35b Mon Sep 17 00:00:00 2001 From: Peter Liljenberg Date: Mon, 27 Jan 2014 11:29:40 +0100 Subject: [PATCH] Added support for Jenkins Campfire plugin Basic setup of Campfire notifications from builds. Change-Id: I4e0bc43a1583fe51e0510743844d66e82b184e23 --- jenkins_jobs/modules/publishers.py | 45 ++++++++++++++++++++++ setup.py | 1 + tests/publishers/fixtures/campfire001.xml | 16 ++++++++ tests/publishers/fixtures/campfire001.yaml | 6 +++ tests/publishers/fixtures/campfire002.xml | 8 ++++ tests/publishers/fixtures/campfire002.yaml | 2 + tests/publishers/fixtures/campfire003.xml | 16 ++++++++ tests/publishers/fixtures/campfire003.yaml | 6 +++ 8 files changed, 100 insertions(+) create mode 100644 tests/publishers/fixtures/campfire001.xml create mode 100644 tests/publishers/fixtures/campfire001.yaml create mode 100644 tests/publishers/fixtures/campfire002.xml create mode 100644 tests/publishers/fixtures/campfire002.yaml create mode 100644 tests/publishers/fixtures/campfire003.xml create mode 100644 tests/publishers/fixtures/campfire003.yaml diff --git a/jenkins_jobs/modules/publishers.py b/jenkins_jobs/modules/publishers.py index 2ca3cd7a5..3855c575a 100644 --- a/jenkins_jobs/modules/publishers.py +++ b/jenkins_jobs/modules/publishers.py @@ -91,6 +91,51 @@ def blame_upstream(parser, xml_parent, data): 'BlameUpstreamCommitersPublisher') +def campfire(parser, xml_parent, data): + """yaml: campfire + Send build notifications to Campfire rooms. + Requires the Jenkins `Campfire Plugin. + + + + + + sub + TOKEN + true + + + room + + + + + diff --git a/tests/publishers/fixtures/campfire001.yaml b/tests/publishers/fixtures/campfire001.yaml new file mode 100644 index 000000000..32f2bba73 --- /dev/null +++ b/tests/publishers/fixtures/campfire001.yaml @@ -0,0 +1,6 @@ +publishers: + - campfire: + subdomain: 'sub' + ssl: true + token: 'TOKEN' + room: 'room' diff --git a/tests/publishers/fixtures/campfire002.xml b/tests/publishers/fixtures/campfire002.xml new file mode 100644 index 000000000..a73ff0109 --- /dev/null +++ b/tests/publishers/fixtures/campfire002.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/tests/publishers/fixtures/campfire002.yaml b/tests/publishers/fixtures/campfire002.yaml new file mode 100644 index 000000000..a42acd778 --- /dev/null +++ b/tests/publishers/fixtures/campfire002.yaml @@ -0,0 +1,2 @@ +publishers: + - campfire diff --git a/tests/publishers/fixtures/campfire003.xml b/tests/publishers/fixtures/campfire003.xml new file mode 100644 index 000000000..431fb21cd --- /dev/null +++ b/tests/publishers/fixtures/campfire003.xml @@ -0,0 +1,16 @@ + + + + + + sub + TOKEN + false + + + room + + + + + diff --git a/tests/publishers/fixtures/campfire003.yaml b/tests/publishers/fixtures/campfire003.yaml new file mode 100644 index 000000000..258b2b47f --- /dev/null +++ b/tests/publishers/fixtures/campfire003.yaml @@ -0,0 +1,6 @@ +publishers: + - campfire: + subdomain: 'sub' + ssl: false + token: 'TOKEN' + room: 'room'