In what parameter?
emailext subject: SUBJECT, body: CONTENT, recipientProviders: [[$class: 
'CulpritsRecipientProvider'],[$class: 'DevelopersRecipientProvider'], [
$class: 'UpstreamComitterRecipientProvider']], to: ""

With the parameter to: "cc:${CC}, bcc:${BCC}", 
or with recipientProviders?
final def RECIPIENTS = emailextrecipients([
        ["cc:${CC}"],
        ["bcc:${BCC}"],
        [$class: 'DevelopersRecipientProvider'],
        [$class: 'CulpritsRecipientProvider'],
        [$class: 'UpstreamComitterRecipientProvider']
    ])


tirsdag 6. september 2016 19.07.42 UTC+2 skrev slide følgende:
>
> You can set cc and bcc in emailext using prefixes cc:[email protected] 
> <javascript:>, bcc:[email protected] <javascript:>
>
> On Tue, Sep 6, 2016 at 9:16 AM Sverre Moe <[email protected] 
> <javascript:>> wrote:
>
>> I followed the Pipeline examples for the email-ext plugin:
>>
>> https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin#Email-extplugin-PipelineExamples
>> There are 3 examples how to use emailextrecipients
>>
>> Problem is only mail allows me to set the cc and bcc.
>>
>> fredag 2. september 2016 16.13.03 UTC+2 skrev slide følgende:
>>
>>> mail is using the mailer plugin, if you want to use email-ext, you need 
>>> to use emailext (see https://jenkins.io/doc/pipeline/steps/email-ext/).
>>>
>>> On Fri, Sep 2, 2016 at 1:36 AM Sverre Moe <[email protected]> wrote:
>>>
>> There seems to be a lottery of some sort what I get 
>>>> from emailextrecipients
>>>>
>>>> I expect to get the authors from the commits it is building, but most 
>>>> of the times emailextrecipients gives me nothing.
>>>>
>>>> /**
>>>>  * Notify developers of failed build
>>>>  */
>>>> void notifyFailedBuild() {
>>>>     final def projectName = packageInfo.getProjectName()
>>>>     final def repositoryOwners = getRepositoryOwners(projectName)
>>>>
>>>>     final def RECIPIENTS = emailextrecipients([
>>>>         [$class: 'DevelopersRecipientProvider'],
>>>>         [$class: 'CulpritsRecipientProvider'],
>>>>         [$class: 'UpstreamComitterRecipientProvider']
>>>>     ])
>>>>
>>>>     final def SUBJECT = "${projectName} ${env.BRANCH_NAME} - Build 
>>>> #${env.BUILD_NUMBER} - FAILED!"
>>>>     final def CONTENT = "Check console output at ${env.BUILD_URL} to 
>>>> view the results."
>>>>
>>>>     if (RECIPIENTS != null && !RECIPIENTS.isEmpty()) {
>>>>
>>>
>>>>         mail to: RECIPIENTS, cc: repositoryOwners, bcc: "devops", 
>>>> replyTo: "[email protected]", subject: SUBJECT, body: CONTENT
>>>>     } else {
>>>>         mail to: repositoryOwners, bcc: "devops", replyTo: "
>>>> [email protected]", subject: SUBJECT, body: CONTENT
>>>>     }
>>>> }
>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Jenkins Users" group.
>>>>
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to [email protected].
>>>
>>>
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/jenkinsci-users/f19567ce-1322-40ee-b9e3-822073762bc7%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/jenkinsci-users/f19567ce-1322-40ee-b9e3-822073762bc7%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/b7b18848-9280-4780-a246-a8cfe97ddfe5%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/b7b18848-9280-4780-a246-a8cfe97ddfe5%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/203e7508-1076-4bf0-8019-b706d3560cb9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to