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

No matrix trigger mode in extendedEmail in multi configuration - Jenkins DSL

XMLWordPrintable

      We use multi configuration project on Jenkins(ver. 2.222.1) We use JenkinsDSL(v1.77) to create the free-style jobs from the groovy scripts. Email notifications is with extendedEmail(v2.69)
      It seems like trigger mode for notifications cannot be specified in the groovy script but it could be done via the UI as below(ONLY_PARENT or ONLY_CONFIGURATIONS or BOTH

      As I see we could specify for extendedEmail in groovy for DSL plugin as below

       

      job('example') {
          publishers {
              extendedEmail {
                  recipientList('me@halfempty.org')
                  defaultSubject('Oops')
                  defaultContent('Something broken')
                  contentType('text/html')
                  triggers {
                      beforeBuild()
                      stillUnstable {
                          subject('Subject')
                          content('Body')
                          sendTo {
                              developers()
                              requester()
                              culprits()
                          }
                      }
                  }
              }
          }
      }

      I was wondering if we had something similar to hipChatNotifier as below ( matrixTriggerMode('ONLY_PARENT'))

       

      job('example') {
        publishers {
          hipChatNotifier {
            room('Dev Team A, QA')
            matrixTriggerMode('ONLY_PARENT')
            startJobMessage(null)
            completeJobMessage(null)
            token(null)
            notifications {
              notificationConfig {
                notifyEnabled(true)
                textFormat(true)
                notificationType('ABORTED')
                color('GRAY')
                messageTemplate(null)
              }

      How do I achieve it for extendedEmail? As I could do the same via the UI 

       

            jamietanna Jamie Tanna
            anudeepmk Anudeep
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: