Code Monkey home page Code Monkey logo

hubot-slack-jenkins-chatops's Introduction

hubot-slack-jenkins-chatops

Jenkins integration with slack interactive message and respond to jenkins notifications.

slack jenkins bot

Installation

In hubot project repository, run:

npm install hubot-slack-jenkins-chatops --save

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

[
  "hubot-slack-jenkins-chatops"
]

Coniguration

Slack

You need to create your own slack app. (Slack's hubot plugin is not support interactive callback) Visit apps page and create new app.

create slack app

Enable interactive components and add Request URL(Request URL SSL certificate requirements). You need to change request url to point to your host. Detail info here.

enable interactive component

Add a bot user like this.

add bot user

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

  • hubot j(enkins) build
    • Lists Jenkins jobs to build
  • hubot j(enkins) build <job name>
    • Build jenkins job

Reference

hubot-slack-jenkins-chatops's People

Contributors

subicura avatar

Watchers

James Cloos avatar Samyak Rout 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.