0.1.3 • Published 5 years ago

hubot-jenkins-notify-statuschanges v0.1.3

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

hubot-jenkins-notify-statuschanges

A hubot plugin to notify a room if jenkins job status changes.

This script provies a HTTP endpoint /hubot/jenkinsnotify which is designed to work with the Jenkins Notification plugin. When a job status changes then the configured chat room will be notified about the job.

Environment variables

HUBOT_JENKINS_NOTIFY_ROOMS

Contains a JSON object of key and values, the key is the url of the Jenkins server and the value is the room which message should be sent from.

HUBOT_JENKINS_NOTIFY_ROOMS="{\"https://ci.example.org\": \"#developers\"}"

HUBOT_JENKINS_SKIP_NOTIFICATION

Contains a JSON array of pairs containing state changes (before after) that should not lead to notification.

HUBOT_JENKINS_SKIP_NOTIFICATION="[ [ \"SUCCESS\", \"UNSTABLE\" ], [ \"FAILURE\", \"ABORTED\" ] ]"

Notifying when state hasn't changed

The url param alwaysnotify can be set to 1 to ensure that any notifications will be reported to the chatroom even if the state is the same as previously.

Startup

When hubot starts up, this plugin will attempt to connect to all the configured jenkins servers on their public API and request job status. The job status will be immediately reported to the chatroom.

See src/jenkins-notify-statuschanges.coffee for full documentation.

Installation

In hubot project repo, run:

npm install hubot-jenkins-notify-statuschanges --save

Then add hubot-jenkins-notify-statuschanges to your external-scripts.json:

[
  "hubot-jenkins-notify-statuschanges"
]

NPM Module

https://www.npmjs.com/package/hubot-jenkins-notify-statuschanges

0.1.3

5 years ago

0.1.2

6 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago