Add view templates for common views and csit jobs.
Update docs and JJB tests.
JIRA: RELENG-1259
Change-Id: I0fda1c089ef516bfd3bb3fb04ea4660d410fb094
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
project: releng/ciman
stream: latest
build-node: build-vm
+
+ view-regex: '{project-name}-.*'
+ view-description: 'List of {project-name} jobs'
+ view-filter-executors: false
+ view-filter-queue: false
+ view-recurse: false
templates:
- java-builder
- mininet
+
+- project:
+ name: ci-jobs-view
+ project-name: ci-jobs
+ views:
+ - common-view
+ view-regex: '.*-ci-jobs$|.*-openstack-jobs$|.*-packer-jobs$'
+ view-description: 'List of ci-jobs, openstack and packer jobs'
- 'gerrit-jenkins-cfg-merge'
project-name: ci-management
+
+- project:
+ name: jenkins-cfg-jobs-view
+ project-name: jenkins-cfg
+ views:
+ - common-view
+ view-regex: '^jenkins-cfg.*'
+ view-description: 'List of jenkins-cfg jobs'
mvn-settings: aproject-settings
mvn-snapshot-id: fakeproject-snapshots
nexus-snapshot-repo: fakeproject-snapshots
+
+- project:
+ name: maven-jobs-view
+ project-name: maven
+ views:
+ - common-view
+ view-regex: '.*-maven$'
+ view-description: 'List of maven jobs'
- "{project-name}-github-node-jobs"
project-name: github-node
+
+- project:
+ name: node-jobs-view
+ project-name: node
+ views:
+ - common-view
+ view-regex: '.*-node$'
+ view-description: 'List of node jobs'
default: test-lf-stack-delete
publishers:
- lf-stack-delete
+
+- project:
+ name: openstack-jobs-view
+ project-name: openstack
+ views:
+ - common-view
+ view-regex: '.*-openstack$'
+ view-description: 'List of openstack jobs'
- github-tox-sonar
project-name: github-python
+
+- project:
+ name: python-jobs-view
+ project-name: python
+ views:
+ - common-view
+ view-regex: '.*-python$'
+ view-description: 'List of Python jobs'
project-name: github-rtd
rtd-build-url: fake-rtd-build-url
rtd-token: fake-rtd-token
+
+- project:
+ name: rtd-jobs-view
+ project-name: rtd
+ views:
+ - common-view
+ view-regex: '.*-rtd$'
+ view-description: 'List of rtd jobs'
--- /dev/null
+.. _lf-global-jjb-views:
+
+#############
+Jenkins Views
+#############
+
+View Templates
+==============
+
+JJB view-templates provides a way to manage Jenkins views through code.
+
+
+Common view
+-----------
+
+Common view groups jobs related to a project and supports the following
+columns.
+
+:Columns:
+ - status
+ - weather
+ - job
+ - last-success
+ - last-failure
+ - last-duration
+ - build-button
+ - jacoco
+ - find-bugs
+ - robot-list
+
+:Template Names:
+ - common-view
+ - {project-name}
+
+:Required parameters:
+
+ :project-name: The name of the view.
+ :view-description: View description. (Generally set to 'List of
+ {project-name} jobs' in defaults.yaml)
+ :view-filter-executors: View filter executor. (Generally set to 'false' in
+ defaults.yaml)
+ :view-filter-queue: View filter queue. (Generally set to 'false' in
+ defaults.yaml)
+ :view-regex: Regex to match the jobs. (Generally set to '^{project-name}-.*'
+ in defaults.yaml)
+ :view-recurse: View recurse. (Generally set to 'false' in defaults.yaml)
+
+Integration CSIT view
+---------------------
+
+Integration CSIT view provides a view for integration or CSIT jobs.
+The view supports the following set of columns.
+
+:Columns:
+ - status
+ - weather
+ - job
+ - last-success
+ - last-failure
+ - last-duration
+ - build-button
+ - robot-list
+
+:Template Names:
+ - integration-csit-view
+ - {project-name}
+
+:Required parameters:
+
+ :project-name: The name of the view.
+ :view-description: View description. (Generally set to 'List of
+ {project-name} jobs' in defaults.yaml)
+ :view-filter-executors: View filter executor. (Generally set to 'false' in
+ defaults.yaml)
+ :view-filter-queue: View filter queue. (Generally set to 'false' in
+ defaults.yaml)
+ :view-regex: Regex to match the jobs. (Generally set to '^{project-name}-.*'
+ in defaults.yaml)
+ :view-recurse: View recurse. (Generally set to 'false' in defaults.yaml)
--- /dev/null
+---
+########################
+# common view template #
+########################
+
+- view-template:
+ id: 'common-view'
+ name: '{project-name}'
+
+ ######################
+ # view Configuration #
+ ######################
+
+ view-type: list
+ filter-executors: '{view-filter-executors}'
+ filter-queue: '{view-filter-queue}'
+ columns:
+ - status
+ - weather
+ - job
+ - last-success
+ - last-failure
+ - last-duration
+ - build-button
+ - jacoco
+ - find-bugs
+ - robot-list
+ recurse: '{view-recurse}'
+ regex: '{view-regex}'
+ description: '{view-description}'
+
+#############################
+# integration view template #
+#############################
+
+- view-template:
+ id: 'integration-csit-view'
+ name: '{project-name}'
+
+ ######################
+ # view Configuration #
+ ######################
+
+ view-type: list
+ filter-executors: '{view-filter-executors}'
+ filter-queue: '{view-filter-queue}'
+ columns:
+ - status
+ - weather
+ - job
+ - last-success
+ - last-failure
+ - last-duration
+ - build-button
+ - robot-list
+ recurse: '{view-recurse}'
+ regex: '{view-regex}'
+ description: '{view-description}'
--- /dev/null
+---
+features:
+ - |
+ New view-templates ``common-view`` and ``integration-csit-view`` are
+ available for projects to manage Jenkins views through code.
+
+ To use the ``common-view`` template in a project.
+
+ Usage:
+
+ .. code-block:: yaml
+
+ - project:
+ ...
+ views:
+ - common-view
+
+ To use the ``integration-csit-view`` template in a project.
+
+ Usage:
+
+ .. code-block:: yaml
+
+ - project:
+ ...
+ views:
+ - integration-csit-view
+
+ - |
+ A separate project section can be defined for views that are common to a
+ set of jobs. This creates a list-type view with ``<project-name>`` in
+ Jenkins which lists all the jobs under the view.
+
+ Usage:
+
+ .. code-block:: yaml
+
+ - project:
+ name: <project-name-view>
+ project: <project>
+ project-name: <project-name>
+ views:
+ - common-view
+
+ Example Usage:
+
+ .. code-block:: yaml
+
+ ---
+ - defaults:
+ name: global
+ view-regex: '^{project-name}-.*'
+ view-description: 'default view description'
+
+ - project:
+ name: project-view
+ project: project
+ project-name: project
+ views:
+ - common-view
+
+ - project:
+ name: project-stream1
+ project: project
+ project-name: project
+ jobs:
+ - '{project-name}-{seq}'
+ seq:
+ - a
+ - b
+
+ - project:
+ name: project-stream2
+ project: project
+ project-name: project
+ jobs:
+ - '{project-name}-{seq}'
+ seq:
+ - x
+ - y
+
+ - job-template:
+ name: '{project-name}-{seq}'