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

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

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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 

       

        Attachments

          Activity

          anudeepmk Anudeep created issue -
          anudeepmk Anudeep made changes -
          Field Original Value New Value
          Description 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

           
          {noformat}
          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()
                              }
                          }
                      }
                  }
              }
          }{noformat}
          I was wondering if we had something similar to hipChatNotifier as below ( *matrixTriggerMode('ONLY_PARENT')*)

           
          {noformat}
          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)
                  }{noformat}
          How do I achieve it for extendedEmail? As I could do the same via the UI 

           
          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*) 

          !JenkinsEmailext-1.png|thumbnail!

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

           
          {noformat}
          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()
                              }
                          }
                      }
                  }
              }
          }{noformat}
          I was wondering if we had something similar to hipChatNotifier as below ( *matrixTriggerMode('ONLY_PARENT')*)

           
          {noformat}
          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)
                  }{noformat}
          How do I achieve it for extendedEmail? As I could do the same via the UI 

           
          anudeepmk Anudeep made changes -
          Description 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*) 

          !JenkinsEmailext-1.png|thumbnail!

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

           
          {noformat}
          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()
                              }
                          }
                      }
                  }
              }
          }{noformat}
          I was wondering if we had something similar to hipChatNotifier as below ( *matrixTriggerMode('ONLY_PARENT')*)

           
          {noformat}
          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)
                  }{noformat}
          How do I achieve it for extendedEmail? As I could do the same via the UI 

           
          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*) 

          !JenkinsEmailext-1.png|width=915,height=151,thumbnail!

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

           
          {noformat}
          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()
                              }
                          }
                      }
                  }
              }
          }{noformat}
          I was wondering if we had something similar to hipChatNotifier as below ( *matrixTriggerMode('ONLY_PARENT')*)

           
          {noformat}
          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)
                  }{noformat}
          How do I achieve it for extendedEmail? As I could do the same via the UI 

           

            People

            Assignee:
            daspilker Daniel Spilker
            Reporter:
            anudeepmk Anudeep
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: