Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

groovy - matrix trigger mode in extendedEmail - Jenkins job DSL

I've a 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) emailextUI triggermode

As I see here, below are the configurations we could specify for extendedEmail in groovy for DSL plugin

job('example') {
    publishers {
        extendedEmail {
            recipientList('[email protected]')
            defaultSubject('Oops')
            defaultContent('Something broken')
            contentType('text/html')
            triggers {
                beforeBuild()
                stillUnstable {
                    subject('Subject')
                    content('Body')
                    sendTo {
                        developers()
                        requester()
                        culprits()
                    }
                }
            }
        }
    }
}

It does not say anything in case of multi configuration project where I need the notifications to be sent only if parent job fails

I believe it exists on hipChatNotifier where we could specify as matrixTriggerMode

hipchatnotifier

Is there a way to do this via extendedEmail publisher as we could do it on the UI?

question from:https://stackoverflow.com/questions/65626829/matrix-trigger-mode-in-extendedemail-jenkins-job-dsl

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...