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

View File

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

View File

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

View File

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

View File

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