summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-08-18 16:20:45 +0000
committerGerrit Code Review <review@openstack.org>2016-08-18 16:20:45 +0000
commit5debe5b3b6d4a91c0e780b92797d2dd057359e2f (patch)
tree0a7033bb699f4058c38e50e719c8ecd1243f0c48
parent9e88b6b7e2ffb2781e8b255838afae2064fe65b8 (diff)
parent457b79fcfe39c87487ad13a64e254feb6d4daa17 (diff)
downloadpython-jenkins-job-builder-5debe5b3b6d4a91c0e780b92797d2dd057359e2f.tar.gz
python-jenkins-job-builder-5debe5b3b6d4a91c0e780b92797d2dd057359e2f.tar.xz
python-jenkins-job-builder-5debe5b3b6d4a91c0e780b92797d2dd057359e2f.zip
Merge "add compress-log option to compress log"
-rw-r--r--jenkins_jobs/modules/publishers.py3
-rw-r--r--tests/publishers/fixtures/email-ext001.xml1
-rw-r--r--tests/publishers/fixtures/email-ext001.yaml1
-rw-r--r--tests/publishers/fixtures/email-ext002.xml1
-rw-r--r--tests/publishers/fixtures/email-ext002.yaml1
-rw-r--r--tests/yamlparser/fixtures/template_override_project_level_defaults.xml1
6 files changed, 8 insertions, 0 deletions
diff --git a/jenkins_jobs/modules/publishers.py b/jenkins_jobs/modules/publishers.py
index 5c0e21bf..4ef18435 100644
--- a/jenkins_jobs/modules/publishers.py
+++ b/jenkins_jobs/modules/publishers.py
@@ -1890,6 +1890,7 @@ def email_ext(parser, xml_parent, data):
like ${BUILD_NUMBER}, but the real magic is using groovy or
javascript to hook into the Jenkins API itself
:arg bool attach-build-log: Include build log in the email (default false)
+ :arg bool compress-log: Compress build log in the email (default false)
:arg str attachments: pattern of files to include as attachment (optional)
:arg bool always: Send an email for every result (default false)
:arg bool unstable: Send an email for an unstable result (default false)
@@ -1991,6 +1992,8 @@ def email_ext(parser, xml_parent, data):
'presend-script', '')
XML.SubElement(emailext, 'attachBuildLog').text = str(data.get(
'attach-build-log', False)).lower()
+ XML.SubElement(emailext, 'compressBuildLog').text = str(data.get(
+ 'compress-log', False)).lower()
XML.SubElement(emailext, 'saveOutput').text = str(data.get(
'save-output', False)).lower()
XML.SubElement(emailext, 'disabled').text = str(data.get(
diff --git a/tests/publishers/fixtures/email-ext001.xml b/tests/publishers/fixtures/email-ext001.xml
index 21286605..2e62a61d 100644
--- a/tests/publishers/fixtures/email-ext001.xml
+++ b/tests/publishers/fixtures/email-ext001.xml
@@ -165,6 +165,7 @@
<attachmentsPattern>*/foo*.log</attachmentsPattern>
<presendScript>cancel=true</presendScript>
<attachBuildLog>false</attachBuildLog>
+ <compressBuildLog>false</compressBuildLog>
<saveOutput>true</saveOutput>
<disabled>false</disabled>
<replyTo>foo@example.com</replyTo>
diff --git a/tests/publishers/fixtures/email-ext001.yaml b/tests/publishers/fixtures/email-ext001.yaml
index 06839cd2..8b6201af 100644
--- a/tests/publishers/fixtures/email-ext001.yaml
+++ b/tests/publishers/fixtures/email-ext001.yaml
@@ -6,6 +6,7 @@ publishers:
subject: Subject for Build ${BUILD_NUMBER}
body: The build has finished
attach-build-log: false
+ compress-log: false
attachments: "*/foo*.log"
always: true
unstable: true
diff --git a/tests/publishers/fixtures/email-ext002.xml b/tests/publishers/fixtures/email-ext002.xml
index bf589ee1..835d883d 100644
--- a/tests/publishers/fixtures/email-ext002.xml
+++ b/tests/publishers/fixtures/email-ext002.xml
@@ -22,6 +22,7 @@
<attachmentsPattern>*/foo*.log</attachmentsPattern>
<presendScript/>
<attachBuildLog>true</attachBuildLog>
+ <compressBuildLog>true</compressBuildLog>
<saveOutput>false</saveOutput>
<disabled>false</disabled>
<replyTo>$DEFAULT_REPLYTO</replyTo>
diff --git a/tests/publishers/fixtures/email-ext002.yaml b/tests/publishers/fixtures/email-ext002.yaml
index 8327a6f0..44850cae 100644
--- a/tests/publishers/fixtures/email-ext002.yaml
+++ b/tests/publishers/fixtures/email-ext002.yaml
@@ -4,5 +4,6 @@ publishers:
subject: Subject for Build ${BUILD_NUMBER}
body: The build has finished
attach-build-log: true
+ compress-log: true
attachments: "*/foo*.log"
matrix-trigger: only-configurations
diff --git a/tests/yamlparser/fixtures/template_override_project_level_defaults.xml b/tests/yamlparser/fixtures/template_override_project_level_defaults.xml
index 598905df..cbc94049 100644
--- a/tests/yamlparser/fixtures/template_override_project_level_defaults.xml
+++ b/tests/yamlparser/fixtures/template_override_project_level_defaults.xml
@@ -33,6 +33,7 @@
<attachmentsPattern/>
<presendScript/>
<attachBuildLog>false</attachBuildLog>
+ <compressBuildLog>false</compressBuildLog>
<saveOutput>false</saveOutput>
<disabled>false</disabled>
<replyTo>$DEFAULT_REPLYTO</replyTo>