The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

Jabber (XMPP) notifier and control plugin

jabberNotify: Jabber Notification

When used in Pipelines, this plugin will act somewhat differently than in AbstractBuild subclasses. Specifically, notification strategy relies on a build result being set, but in pipelines it is not (yet) set. Here are some ways to use it:
  • Set result yourself (and use a single jabberNotify step)
                    
    try {
        //main build here.
    
        currentBuild.result = Result.SUCCESS.toString() //otherwise message will say "NOT_BUILT"
    } catch(e) {
        currentBuild.result = Result.FAILURE.toString()
        throw e
    } finally {
        jabberNotify notificationStrategy: 'failure and fixed', notifyCulprits: true, notifySuspects: true, targets: '...'
    }
                    
                
  • Decide when to notify (and author your own messages)
                    
    jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Started', targets: '...'
    try {
        //main build here
    
        jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Succeeded', targets: '...'
    } catch (e) {
        jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Failed', targets: '...'
        throw e
    }
    
                    
                
  • targets : String
  • buildToChatNotifier (optional)
      Nested Choice of Objects
  • extraMessage : String (optional)
  • matrixNotifier (optional)
    • Values: ONLY_PARENT, ONLY_CONFIGURATIONS, ALL
  • notificationStrategy : String (optional)
    This only makes sense if the build result has been set, either because this step is in a catch or finally block and the job already failed, or because it was manually set in the DSL (eg: currentBuild.result = Result.FAILURE.toString()) If it was not set, then only "all" will make sense.
  • notifyCulprits : boolean (optional)
  • notifyFixers : boolean (optional)
  • notifySuspects : boolean (optional)
  • notifyUpstreamCommitters : boolean (optional)

Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

    


See existing feedback here.