Jenkins : Spark Notifier Plugin

Plugin Information

View Cisco Spark Notifier on the plugin site for more information.

Enables Jenkins to notify Cisco Spark Spaces from build, post-build and pipeline steps

 

A comprehensive tutorial for using the plugin exists here courtesy of jlestrada

Messages can be formatted as plain text, markdown or html (with limitations)

Click the help icon next to the Message field to see commonly available environment variables

Credential Setup

  1. Obtain a bot token (valid for 100 years) from the developer site, or use your own personal token (not recommended)
  2. The Bot or User must be invited to the Spark Space to send messages from Jenkins
  3. Configure a new "String text" credential either globally or within a folder

Pipeline Step Example

You can use the Pipeline Syntax generator to configure the spark message DSL syntax

Build Steps Example

Post-Build Step Example with Formatting and Environment Variables 

 

Note regarding environment variables:

Accepted formats are:

  • ${VARIABLE}
  • $VARIABLE
  • ${env.VARIABLE}

Click the help icon next to the message field to see default environment variables available to use. All parameterized variables to a build are also available to use.

To use custom variables in build/post-build steps, you need to inject the variables into the build using Environment Injector Plugin, Credentials Binding plugin etc.

To use custom variables in pipeline steps, your sparkSend DSL must reside inside a withEnv, withCredentials etc.

Changelog

See https://github.com/jenkinsci/cisco-spark-notifier-plugin/blob/master/CHANGELOG.md