Hello community,

here is the log from the commit of package python-jenkins-job-builder for 
openSUSE:Factory checked in at 2017-03-17 15:07:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-jenkins-job-builder (Old)
 and      /work/SRC/openSUSE:Factory/.python-jenkins-job-builder.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-jenkins-job-builder"

Fri Mar 17 15:07:19 2017 rev:5 rq:479961 version:1.6.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-jenkins-job-builder/python-jenkins-job-builder.changes
    2017-01-15 11:16:47.273368842 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-jenkins-job-builder.new/python-jenkins-job-builder.changes
       2017-03-17 15:07:21.490973979 +0100
@@ -1,0 +2,7 @@
+Wed Mar 15 13:20:22 GMT 2017 - [email protected]
+
+- Add two patches for the log parser plugin:
+  * 0002-Update-logparser-plugin.patch
+  * 0003-add-two-new-options-to-Log-Parser-Plugin.patch
+
+-------------------------------------------------------------------

New:
----
  0002-Update-logparser-plugin.patch
  0003-add-two-new-options-to-Log-Parser-Plugin.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-jenkins-job-builder.spec ++++++
--- /var/tmp/diff_new_pack.BF2XMx/_old  2017-03-17 15:07:22.370849802 +0100
+++ /var/tmp/diff_new_pack.BF2XMx/_new  2017-03-17 15:07:22.370849802 +0100
@@ -27,6 +27,10 @@
 Source:         
https://pypi.io/packages/source/j/jenkins-job-builder/jenkins-job-builder-%{version}.tar.gz
 # PATCH-FIX-UPSTREAM 0001-Fix-timeout-wrapper-version-detection.patch -- 
https://review.openstack.org/387799
 Patch1:         0001-Fix-timeout-wrapper-version-detection.patch
+# PATCH-FIX-UPSTREAM 0002-Update-logparser-plugin.patch -- 
https://review.openstack.org/379194
+Patch2:         0002-Update-logparser-plugin.patch
+# PATCH-FIX-UPSTREAM 0003-add-two-new-options-to-Log-Parser-Plugin.patch -- 
https://review.openstack.org/445509
+Patch3:         0003-add-two-new-options-to-Log-Parser-Plugin.patch
 BuildRequires:  python-pbr
 BuildRequires:  python-setuptools-git
 Requires:       python-PyYAML
@@ -50,6 +54,8 @@
 %prep
 %setup -q -n jenkins-job-builder-%{version}
 %patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
 python setup.py build

++++++ 0002-Update-logparser-plugin.patch ++++++
>From a07c886c89f1afca70642ca5280716523dc8cef9 Mon Sep 17 00:00:00 2001
From: Dong Ma <[email protected]>
Date: Wed, 28 Sep 2016 23:50:31 -0700
Subject: [PATCH] Update logparser plugin

- update logparser plugin to user convert xml
- update logparser docstring

Change-Id: I13b36024bcaa3cfca2c8f2d3530bbc31dc9f52a8
---
 jenkins_jobs/modules/publishers.py         | 18 ++++++++++--------
 tests/publishers/fixtures/logparser001.xml |  2 +-
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/jenkins_jobs/modules/publishers.py 
b/jenkins_jobs/modules/publishers.py
index 2a36c23..7ec9280 100644
--- a/jenkins_jobs/modules/publishers.py
+++ b/jenkins_jobs/modules/publishers.py
@@ -2146,9 +2146,10 @@ def logparser(registry, xml_parent, data):
     """yaml: logparser
     Requires the Jenkins :jenkins-wiki:`Log Parser Plugin <Log+Parser+Plugin>`.
 
-    :arg str parse-rules: full path to parse rules
+    :arg str parse-rules: full path to parse rules (default '')
     :arg bool unstable-on-warning: mark build unstable on warning
-    :arg bool fail-on-error: mark build failed on error
+        (default false)
+    :arg bool fail-on-error: mark build failed on error (default false)
 
     Example:
 
@@ -2158,12 +2159,13 @@ def logparser(registry, xml_parent, data):
 
     clog = XML.SubElement(xml_parent,
                           'hudson.plugins.logparser.LogParserPublisher')
-    XML.SubElement(clog, 'unstableOnWarning').text = \
-        str(data.get('unstable-on-warning', False)).lower()
-    XML.SubElement(clog, 'failBuildOnError').text = \
-        str(data.get('fail-on-error', False)).lower()
-    # v1.08: this must be the full path, the name of the rules is not enough
-    XML.SubElement(clog, 'parsingRulesPath').text = data.get('parse-rules', '')
+    clog.set('plugin', 'log-parser')
+    mappings = [
+        ('unstable-on-warning', 'unstableOnWarning', False),
+        ('fail-on-error', 'failBuildOnError', False),
+        ('parse-rules', 'parsingRulesPath', '')
+    ]
+    helpers.convert_mapping_to_xml(clog, data, mappings, fail_required=True)
 
 
 def copy_to_master(parser, xml_parent, data):
diff --git a/tests/publishers/fixtures/logparser001.xml 
b/tests/publishers/fixtures/logparser001.xml
index 44881b7..15f3f8c 100644
--- a/tests/publishers/fixtures/logparser001.xml
+++ b/tests/publishers/fixtures/logparser001.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <project>
   <publishers>
-    <hudson.plugins.logparser.LogParserPublisher>
+    <hudson.plugins.logparser.LogParserPublisher plugin="log-parser">
       <unstableOnWarning>true</unstableOnWarning>
       <failBuildOnError>true</failBuildOnError>
       <parsingRulesPath>/path/to/parserules</parsingRulesPath>
-- 
2.1.2.330.g565301e

++++++ 0003-add-two-new-options-to-Log-Parser-Plugin.patch ++++++
>From d3307d6938edfa45470a454b2092fe25ec6870f2 Mon Sep 17 00:00:00 2001
From: Adam Spiers <[email protected]>
Date: Tue, 14 Mar 2017 13:51:08 +0000
Subject: [PATCH] add two new options to Log Parser Plugin

Support both global and per-project rules, and the showGraphs option,
both of which became possible in the 2.0 release:

https://github.com/jenkinsci/log-parser-plugin/compare/log-parser-1.0.8...log-parser-2.0
https://github.com/jenkinsci/log-parser-plugin/commit/ecde717b9bc618c2d4c8b2526caf10655272148c
https://github.com/jenkinsci/log-parser-plugin/commit/6e75ecc8f9f82a17ec151c879dc37d882909df17

Change-Id: I38b0058467d16ca7e3c4d3dc4edb2c9294551f15
---
 jenkins_jobs/modules/publishers.py               | 20 ++++++++++++++++++--
 tests/publishers/fixtures/logparser-full.xml     | 12 ++++++++++++
 tests/publishers/fixtures/logparser-full.yaml    |  7 +++++++
 tests/publishers/fixtures/logparser-minimal.xml  | 12 ++++++++++++
 tests/publishers/fixtures/logparser-minimal.yaml |  3 +++
 tests/publishers/fixtures/logparser001.xml       | 10 ----------
 tests/publishers/fixtures/logparser001.yaml      |  5 -----
 7 files changed, 52 insertions(+), 17 deletions(-)
 create mode 100644 tests/publishers/fixtures/logparser-full.xml
 create mode 100644 tests/publishers/fixtures/logparser-full.yaml
 create mode 100644 tests/publishers/fixtures/logparser-minimal.xml
 create mode 100644 tests/publishers/fixtures/logparser-minimal.yaml
 delete mode 100644 tests/publishers/fixtures/logparser001.xml
 delete mode 100644 tests/publishers/fixtures/logparser001.yaml

diff --git a/jenkins_jobs/modules/publishers.py 
b/jenkins_jobs/modules/publishers.py
index 18e7e04..646007d 100644
--- a/jenkins_jobs/modules/publishers.py
+++ b/jenkins_jobs/modules/publishers.py
@@ -2335,23 +2335,39 @@ def logparser(registry, xml_parent, data):
     Requires the Jenkins :jenkins-wiki:`Log Parser Plugin <Log+Parser+Plugin>`.
 
     :arg str parse-rules: full path to parse rules (default '')
+    :arg bool use-project-rules: use project rules instead of global
+        (default true)
     :arg bool unstable-on-warning: mark build unstable on warning
         (default false)
     :arg bool fail-on-error: mark build failed on error (default false)
+    :arg bool show-graphs: show parser trend graphs (default true)
 
     Example:
 
-    .. literalinclude::  /../../tests/publishers/fixtures/logparser001.yaml
+
+    Minimal Example:
+
+    .. literalinclude:: /../../tests/publishers/fixtures/logparser-minimal.yaml
+       :language: yaml
+
+    Full Example:
+
+    .. literalinclude:: /../../tests/publishers/fixtures/logparser-full.yaml
        :language: yaml
     """
 
     clog = XML.SubElement(xml_parent,
                           'hudson.plugins.logparser.LogParserPublisher')
     clog.set('plugin', 'log-parser')
+    rules_path_element = ("projectRulePath"
+                          if data.get("use-project-rules", True)
+                          else "parsingRulesPath")
     mappings = [
         ('unstable-on-warning', 'unstableOnWarning', False),
         ('fail-on-error', 'failBuildOnError', False),
-        ('parse-rules', 'parsingRulesPath', '')
+        ('show-graphs', 'showGraphs', True),
+        ('use-project-rules', 'useProjectRule', True),
+        ('parse-rules', rules_path_element, ''),
     ]
     helpers.convert_mapping_to_xml(clog, data, mappings, fail_required=True)
 
diff --git a/tests/publishers/fixtures/logparser-full.xml 
b/tests/publishers/fixtures/logparser-full.xml
new file mode 100644
index 0000000..caac716
--- /dev/null
+++ b/tests/publishers/fixtures/logparser-full.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+  <publishers>
+    <hudson.plugins.logparser.LogParserPublisher plugin="log-parser">
+      <unstableOnWarning>true</unstableOnWarning>
+      <failBuildOnError>true</failBuildOnError>
+      <showGraphs>false</showGraphs>
+      <useProjectRule>false</useProjectRule>
+      <parsingRulesPath>/path/to/global-rules</parsingRulesPath>
+    </hudson.plugins.logparser.LogParserPublisher>
+  </publishers>
+</project>
diff --git a/tests/publishers/fixtures/logparser-full.yaml 
b/tests/publishers/fixtures/logparser-full.yaml
new file mode 100644
index 0000000..eaef895
--- /dev/null
+++ b/tests/publishers/fixtures/logparser-full.yaml
@@ -0,0 +1,7 @@
+publishers:
+  - logparser:
+      use-project-rules: false
+      parse-rules: "/path/to/global-rules"
+      unstable-on-warning: true
+      fail-on-error: true
+      show-graphs: false
diff --git a/tests/publishers/fixtures/logparser-minimal.xml 
b/tests/publishers/fixtures/logparser-minimal.xml
new file mode 100644
index 0000000..681d63f
--- /dev/null
+++ b/tests/publishers/fixtures/logparser-minimal.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+  <publishers>
+    <hudson.plugins.logparser.LogParserPublisher plugin="log-parser">
+      <unstableOnWarning>false</unstableOnWarning>
+      <failBuildOnError>false</failBuildOnError>
+      <showGraphs>true</showGraphs>
+      <useProjectRule>true</useProjectRule>
+      <projectRulePath>project-log-parser-rules.txt</projectRulePath>
+    </hudson.plugins.logparser.LogParserPublisher>
+  </publishers>
+</project>
diff --git a/tests/publishers/fixtures/logparser-minimal.yaml 
b/tests/publishers/fixtures/logparser-minimal.yaml
new file mode 100644
index 0000000..78d54c8
--- /dev/null
+++ b/tests/publishers/fixtures/logparser-minimal.yaml
@@ -0,0 +1,3 @@
+publishers:
+  - logparser:
+      parse-rules: "project-log-parser-rules.txt"
diff --git a/tests/publishers/fixtures/logparser001.xml 
b/tests/publishers/fixtures/logparser001.xml
deleted file mode 100644
index 15f3f8c..0000000
--- a/tests/publishers/fixtures/logparser001.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project>
-  <publishers>
-    <hudson.plugins.logparser.LogParserPublisher plugin="log-parser">
-      <unstableOnWarning>true</unstableOnWarning>
-      <failBuildOnError>true</failBuildOnError>
-      <parsingRulesPath>/path/to/parserules</parsingRulesPath>
-    </hudson.plugins.logparser.LogParserPublisher>
-  </publishers>
-</project>
diff --git a/tests/publishers/fixtures/logparser001.yaml 
b/tests/publishers/fixtures/logparser001.yaml
deleted file mode 100644
index 7749e12..0000000
--- a/tests/publishers/fixtures/logparser001.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
-publishers:
-  - logparser:
-      parse-rules: "/path/to/parserules"
-      unstable-on-warning: true
-      fail-on-error: true
-- 
2.1.2.330.g565301e


Reply via email to