Giter Site home page Giter Site logo

hubot-jenkins-slack's Introduction

Hubot Jenkins notifier for Slack

Respond to Jenkins notifications in a format appropiated for Slack attachments.

Installation

In hubot project repository, run:

npm install hubot-jenkins-slack --save

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

[
  "hubot-jenkins-slack"
]

You also need slack-attachment module installed for version 3 of hubot-slack adapter.

Screenshots

Below you could see a sample session of hubot-jenkins-slack with:

  1. a build that finalized with success;
  2. a build that starts from our master branch;
  3. a build that failed;
  4. a build that starts from a pull request.

attachments

The obscured information in the first line of each notification follows the following pattern: Jenkins #{job name} #{action} #{job build URL}.

Configuration

Jenkins

You need to enable Jenkins Notification plugin and then, in each project you would like to be notified about, add an endpoint like the following:

Add Notification endpoint

You only need to change URL to point to your host. Take into account that the URL path begins with your Hubot instance name, so if your Hubot is named marvin, the URL should be http://example.com/marvin/jenkins instead.

The room query string parameter is required, as an indicator of the channel name where you would like your notification to be displayed. You don't need to prefix your room name with #, so if you want your notifications displayed in the #ci channel, then you need to pass ?room=ci.

In case you want to see the message received and the attachment sent, you can also pass debug=1.

Environment variables

The following environment variables define the colors used for each build status:

  • HUBOT_JENKINS_COLOR_ABORTED
  • HUBOT_JENKINS_COLOR_FAILURE
  • HUBOT_JENKINS_COLOR_FIXED
  • HUBOT_JENKINS_COLOR_STILL_FAILING
  • HUBOT_JENKINS_COLOR_SUCCESS
  • HUBOT_JENKINS_COLOR_DEFAULT

Commands

This plugin currently offers no commands.

License

This software is licensed under MIT License. See License for more details.

hubot-jenkins-slack's People

Contributors

inkel avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.