Coder Social home page Coder Social logo

enhanced-flowdock-pipeline's Introduction

enhanced-jenkins-flowdock-notifier

A simple Groovy script which enables Flowdock notifications to be sent from a Jenkins Pipeline. The current Flowdock notification plugin does not have any Pipeline integration--here is a stopgap.

Inspired by and lifted from this thread and this comment specifically. and https://github.com/c3tp/jenkins-flowdock-notifier

Prerequisites

The following must be available in your Jenkins installation to use this library:

Installation

A Jenkins administrator must install the library as follows:

  1. In Manage Jenkins => Configure System, find the Global Pipeline Libraries section.
  2. Click on Add.
  3. Specify:
  • Name: enhanced-flowdock-notifier
  • Default version: master
  1. For retrieval method, select Modern SCM and then GitLab:
  • Owner: eeddir
  • Repository: enhanced-flowdock-pipeline
  1. Click Save at the bottom.

Use

You must declare use of the library somewhere before use:

library 'enhanced-flowdock-notifier'

Then, call enhancedFlowdockNotify in an appropriate place in your pipeline. It needs to be a step-class block. There are four arguments:

  1. this - passes the script object to the notifier function to provide necessary context
  2. API token for Flowdock. This can be retrieved from your Flowdock profile page
  3. A string containing list of tags (optional).
  4. An parameter indicating whether a chat notification shall be sent for a successful build (SEND_CHAT_FOR_SUCCESS, default), or not (NO_CHAT_FOR_SUCCESS)

For example:

pipeline {
   //...
   stage('Flowdock Notifier') {
      library 'enhanced-flowdock-notifier'
      enhancedFlowdockNotify this,'token', '#test', 'NO_CHAT_FOR_SUCCESS'
   }
}

enhanced-flowdock-pipeline's People

Contributors

eeddir avatar

Watchers

 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.