diff --git a/jenkins_jobs/modules/publishers.py b/jenkins_jobs/modules/publishers.py index 30b6c7030..dc68e1b1a 100644 --- a/jenkins_jobs/modules/publishers.py +++ b/jenkins_jobs/modules/publishers.py @@ -1840,6 +1840,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) @@ -1941,6 +1942,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 21286605f..2e62a61d4 100644 --- a/tests/publishers/fixtures/email-ext001.xml +++ b/tests/publishers/fixtures/email-ext001.xml @@ -165,6 +165,7 @@ */foo*.log cancel=true false + false true false foo@example.com diff --git a/tests/publishers/fixtures/email-ext001.yaml b/tests/publishers/fixtures/email-ext001.yaml index 06839cd2d..8b6201af3 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 bf589ee10..835d883d7 100644 --- a/tests/publishers/fixtures/email-ext002.xml +++ b/tests/publishers/fixtures/email-ext002.xml @@ -22,6 +22,7 @@ */foo*.log true + true false false $DEFAULT_REPLYTO diff --git a/tests/publishers/fixtures/email-ext002.yaml b/tests/publishers/fixtures/email-ext002.yaml index 8327a6f09..44850caea 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 598905df5..cbc94049a 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 @@ false + false false false $DEFAULT_REPLYTO