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.

JMS Messaging Plugin

sendCIMessage: CI Notifier

  • providerName : String
  • overrides
      Nested Object
    • topic : String (optional)
    • queue : String (optional)
  • messageType

    Type of CI message to be sent.

    • Values: CodeQualityChecksDone, ComponentBuildDone, Custom, EarlyPerformanceTestingDone, EarlySecurityTestingDone, ImageUploaded, FunctionalTestCoverageDone, FunctionalTestingDone, NonfunctionalTestingDone, OotbTestingDone, PeerReviewDone, ProductAcceptedForReleaseTesting, ProductBuildDone, ProductBuildInStaging, ProductTestCoverageDone, PullRequest, SecurityChecksDone, TestingStarted, TestingCompleted, Tier0TestingDone, Tier1TestingDone, Tier2IntegrationTestingDone, Tier2ValidationTestingDone, Tier3TestingDone, UnitTestCoverageDone, UpdateDefectStatus
  • messageProperties : String

    KEY=value pairs, one per line (Java properties file format) to be used as message properties. Backslashes are used for escaping, so use "\\" for a single backslash. Current build parameters and/or environment variables can be used in form: ${PARAM}.

  • messageContent : String

    Content of CI message to be sent. Environment variable values may be used in the content to allow customization of the message. Environment variables should use the familiar bash shell format, e.g. ${VARIABLE}.

  • failOnError : boolean

    Whether you want to fail the build if there is an error sending a message. By default, it is false.

waitForCIMessage: CI Subscriber

Subscribe to the CI message bus and wait for a message matching the specified JMS selector.

The timeout value specifies the maximum number of minutes to wait for a message matching the JMS selector to appear.

This step returns the value of the Message content as a string

node {
  def messageContent = waitForCIMessage selector: "CI_TYPE = 'code-quality-checks-done' and CI_STATUS = 'failed'"
  // The message content is now available as a variable
  echo messageContent
  // The message content is set as an environment variable
  env.messageContent = messageContent
  sh 'path/to/a/script.sh'
}
  • providerName : String
  • overrides
      Nested Object
    • topic : String (optional)
    • queue : String (optional)
  • selector : String

    JMS selector use to select message to receive.

  • timeout : int

    Value (in minutes) to wait for a message matching the specified JMS selector.

  • checks
      Array / List of Nested Object
    • field : String
    • expectedValue : 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.