From 22420e28607171e67b5d1b839851564d854debb9 Mon Sep 17 00:00:00 2001 From: Anil Belur Date: Wed, 24 Jan 2018 17:59:30 +1000 Subject: [PATCH] Add support for plugin column views Add support plugin column views. The default columns are added which dont require additional plugin installed. For columns which require plugin support they are added only if the column is provided as in input. Add support for the below plugins for view columns: - Robot - Findbugs - JaCoCo - Git - ScheduleBuild - BuildFilter Also added a column for the description which does not require additional plugin support. Change-Id: I5d756e5741b0aa1ca58bcc69b79e8e3436e9759d Signed-off-by: Anil Belur --- jenkins_jobs/modules/view_list.py | 9 +++++++++ tests/views/fixtures/view_list001.xml | 8 ++++++++ tests/views/fixtures/view_list001.yaml | 8 ++++++++ 3 files changed, 25 insertions(+) diff --git a/jenkins_jobs/modules/view_list.py b/jenkins_jobs/modules/view_list.py index 098e53627..45c66b25b 100644 --- a/jenkins_jobs/modules/view_list.py +++ b/jenkins_jobs/modules/view_list.py @@ -60,6 +60,15 @@ COLUMN_DICT = { 'last-duration': 'hudson.views.LastDurationColumn', 'build-button': 'hudson.views.BuildButtonColumn', 'last-stable': 'hudson.views.LastStableColumn', + 'robot-list': 'hudson.plugins.robot.view.RobotListViewColum', + 'find-bugs': 'hudson.plugins.findbugs.FindBugsColumn', + 'jacoco': 'hudson.plugins.jacococoveragecolumn.JaCoCoColumn', + 'git-branch': 'hudson.plugins.git.GitBranchSpecifierColumn', + 'schedule-build': + 'org.jenkinsci.plugins.schedulebuild.ScheduleBuildButtonColumn', + 'priority-sorter': 'jenkins.advancedqueue.PrioritySorterJobColumn', + 'build-filter': 'hudson.views.BuildFilterColumn', + 'desc': 'jenkins.branch.DescriptionColumn', } DEFAULT_COLUMNS = ['status', 'weather', 'job', 'last-success', 'last-failure', 'last-duration', 'build-button'] diff --git a/tests/views/fixtures/view_list001.xml b/tests/views/fixtures/view_list001.xml index 02a345657..db14dfb50 100644 --- a/tests/views/fixtures/view_list001.xml +++ b/tests/views/fixtures/view_list001.xml @@ -21,6 +21,14 @@ + + + + + + + + true false diff --git a/tests/views/fixtures/view_list001.yaml b/tests/views/fixtures/view_list001.yaml index 29b48c27e..9b0400e58 100644 --- a/tests/views/fixtures/view_list001.yaml +++ b/tests/views/fixtures/view_list001.yaml @@ -16,5 +16,13 @@ columns: - last-duration - build-button - last-stable + - robot-list + - find-bugs + - jacoco + - git-branch + - schedule-build + - priority-sorter + - build-filter + - desc recurse: true status-filter: false