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.

MQTT Notification Plugin

mqttNotification: MQTT Notification

  • brokerUrl (optional)

    The URL for the MQTT broker. This should also include the protocol (e.g. "tcp://192.168.0.1:1883").

    • Type: String
  • topic (optional)

    The topic to which to publish the notification. If no value is specified then the default value ("jenkins/$JOB_URL" e.g. "jenkins/job/my-build") is used.

    In addition to environment variables and build parameters, the following variables can also be used (all variables must be prefix with "$"):

    • BUILD_RESULT - The result of the build (e.g. SUCCESS, FAILURE, ABORTED, etc.)
    • PROJECT_URL - The job project's URL (e.g. "job/my-build")
    • CULPRITS - Comma-separated list of the culprits responsible for the current build result
    • BUILD_NUMBER - the build number

    • Type: String
  • message (optional)

    The "payload" for the MQTT message.

    In addition to environment variables and build parameters, the following variables can also be used (all variables must be encapsulated within "${}"):

    • BUILD_RESULT - The result of the build (e.g. SUCCESS, FAILURE, ABORTED, etc.)
    • PROJECT_URL - The job project's URL (e.g. "job/my-build")
    • CULPRITS - Comma-separated list of the culprits responsible for the current build result
    • BUILD_NUMBER - the build number

    • Type: String
  • qos (optional)
    The three Qualities of Service, as defined by the MQTT specification, are:
    • "At most once", where messages are delivered according to the best efforts of the underlying TCP/IP network. Message loss or duplication can occur. This level could be used, for example, with ambient sensor data where it does not matter if an individual reading is lost as the next one will be published soon after.
    • "At least once", where messages are assured to arrive but duplicates may occur.
    • "Exactly once", where message are assured to arrive exactly once. This level could be used, for example, with billing systems where duplicate or lost messages could lead to incorrect charges being applied.
    • Type: String
  • retainMessage (optional)

    If the message is "retained" then the broker will keep a copy as the "last known" message and publish it to any new subscribers when they first connect.

    • Type: boolean
  • credentialsId (optional)
    • Type: String

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.