Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-41939

Groovy function to send notifications in Jenkinsfiles / pipelines

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major Major
    • notification-plugin
    • None

      It appears that the notification plugin doesnt have the functionality to send a notification from a pipeline or a Jenkinsfile via a groovy command. That's pretty important especially when Jenkinsfiles overwrites configuration data for jenkins jobs, basically making it impossible to send notifications for any jobs (with this plugin) to a http endpoint.

      Ideal functionality would be something like being able to write something like this in a pipeline:

      pipeline {
        agent any
        post {
          always {
            notify( endpoint: "myUrl", message: "optional: job completed" )
          }
        }
      }
      

            Unassigned Unassigned
            gaieges Evin Callahan
            Votes:
            7 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: