Merge "add post-send script option"

This commit is contained in:
Jenkins 2016-08-22 06:16:55 +00:00 committed by Gerrit Code Review
commit c73cb4686a
5 changed files with 8 additions and 0 deletions

View File

@ -1913,6 +1913,8 @@ def email_ext(registry, xml_parent, data):
:arg bool pre-build: Send an email before the build (default false)
:arg str presend-script: A Groovy script executed prior sending the mail.
(default '')
:arg str postsend-script: A Goovy script executed after sending the email.
(default '')
:arg bool save-output: Save email content to workspace (default false)
:arg str matrix-trigger: If using matrix projects, when to trigger
@ -1990,6 +1992,8 @@ def email_ext(registry, xml_parent, data):
'attachments', '')
XML.SubElement(emailext, 'presendScript').text = data.get(
'presend-script', '')
XML.SubElement(emailext, 'postsendScript').text = data.get(
'postsend-script', '')
XML.SubElement(emailext, 'attachBuildLog').text = str(data.get(
'attach-build-log', False)).lower()
XML.SubElement(emailext, 'compressBuildLog').text = str(data.get(

View File

@ -164,6 +164,7 @@
<defaultContent>The build has finished</defaultContent>
<attachmentsPattern>*/foo*.log</attachmentsPattern>
<presendScript>cancel=true</presendScript>
<postsendScript>cancel=true</postsendScript>
<attachBuildLog>false</attachBuildLog>
<compressBuildLog>false</compressBuildLog>
<saveOutput>true</saveOutput>

View File

@ -24,6 +24,7 @@ publishers:
pre-build: true
matrix-trigger: only-configurations
presend-script: "cancel=true"
postsend-script: "cancel=true"
save-output: true
send-to:
- developers

View File

@ -21,6 +21,7 @@
<defaultContent>The build has finished</defaultContent>
<attachmentsPattern>*/foo*.log</attachmentsPattern>
<presendScript/>
<postsendScript/>
<attachBuildLog>true</attachBuildLog>
<compressBuildLog>true</compressBuildLog>
<saveOutput>false</saveOutput>

View File

@ -32,6 +32,7 @@
<defaultContent>$DEFAULT_CONTENT</defaultContent>
<attachmentsPattern/>
<presendScript/>
<postsendScript/>
<attachBuildLog>false</attachBuildLog>
<compressBuildLog>false</compressBuildLog>
<saveOutput>false</saveOutput>