diff options
author | Anil Belur <askb23@gmail.com> | 2018-03-11 13:17:15 +1000 |
---|---|---|
committer | Sorin Sbarnea <ssbarnea@redhat.com> | 2018-04-19 09:37:35 +0100 |
commit | 1aa3f9895cef87aabaae0e29e0d07d89106485c5 (patch) | |
tree | 0022059eedcef286796ca53af9b5d42ae6be2b1c /jenkins_jobs/modules/view_list.py | |
parent | ac345d0e6635d2809b730e3e659f369e3571511b (diff) | |
download | python-jenkins-job-builder-1aa3f9895cef87aabaae0e29e0d07d89106485c5.tar.gz python-jenkins-job-builder-1aa3f9895cef87aabaae0e29e0d07d89106485c5.tar.xz python-jenkins-job-builder-1aa3f9895cef87aabaae0e29e0d07d89106485c5.zip |
Add support for unclassified job filters
Add support for unclassified job filters for views.
Change-Id: I64f0464857b4925cd5b5b9714b8ba1bb1f860244
Signed-off-by: Anil Belur <askb23@gmail.com>
Diffstat (limited to 'jenkins_jobs/modules/view_list.py')
-rw-r--r-- | jenkins_jobs/modules/view_list.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/jenkins_jobs/modules/view_list.py b/jenkins_jobs/modules/view_list.py index e9946f95..945fb31b 100644 --- a/jenkins_jobs/modules/view_list.py +++ b/jenkins_jobs/modules/view_list.py @@ -198,6 +198,11 @@ to the :ref:`view_list` definition. * **exclude-originals** ('bool'): Jobs that are originals. (default False) + * **unclassified** (`dict`) + :unclassified: + * **match-type** ('str'): Jobs that match a filter to include. + (default includeMatched) + * **columns** (`list`): List of columns to be shown in view. * **regex** (`str`): . Regular expression for selecting jobs (optional) @@ -507,6 +512,18 @@ class List(jenkins_jobs.modules.base.Base): convert_mapping_to_xml(up_xml, up_data, mapping, fail_required=True) + if jobfilter == 'unclassified': + uc_xml = XML.SubElement(job_filter_xml, + 'hudson.views.UnclassifiedJobsFilter') + uc_xml.set('plugin', 'view-job-filters') + uc_data = jobfilters.get('unclassified') + mapping = [ + ('match-type', 'includeExcludeTypeString', + 'includeMatched'), + ] + convert_mapping_to_xml(uc_xml, uc_data, mapping, + fail_required=True) + c_xml = XML.SubElement(root, 'columns') columns = data.get('columns', DEFAULT_COLUMNS) |