project: releng/ciman
stream: latest
build-node: build-vm
-
- view-regex: '{project-name}-.*'
- view-description: 'List of {project-name} jobs'
- 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'
+ - project-view
+
+ project-name: ci-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'
--- /dev/null
+---
+- project:
+ name: common-view-test
+ views:
+ - common-view
+
+ view-name: Daily
+ view-regex: '.*-daily-.*'
--- /dev/null
+---
+- project:
+ name: csit-view-test
+ views:
+ - csit-view
+
+ view-name: CSIT-1node
+ view-regex: '.*csit-1node.*'
- project:
name: maven-jobs-view
- project-name: maven
views:
- - common-view
- view-regex: '.*-maven$'
- view-description: 'List of maven jobs'
+ - project-view
+
+ project-name: maven
- project:
name: node-jobs-view
- project-name: node
views:
- - common-view
- view-regex: '.*-node$'
- view-description: 'List of node jobs'
+ - project-view
+
+ project-name: node
- project:
name: openstack-jobs-view
- project-name: openstack
views:
- - common-view
- view-regex: '.*-openstack$'
- view-description: 'List of openstack jobs'
+ - project-view
+
+ project-name: openstack
--- /dev/null
+---
+- project:
+ name: project-view-test
+ views:
+ - project-view
+
+ project-name: project-view-test
- project:
name: python-jobs-view
- project-name: python
views:
- - common-view
- view-regex: '.*-python$'
- view-description: 'List of Python jobs'
+ - project-view
+
+ project-name: python
- project:
name: rtd-jobs-view
- project-name: rtd
views:
- - common-view
- view-regex: '.*-rtd$'
- view-description: 'List of rtd jobs'
+ - project-view
+
+ project-name: rtd
View Templates
==============
-JJB view-templates provides a way to manage Jenkins views through code.
+JJB view-templates provides a way to manage Jenkins views through code. Using
+view-templates we can define common views configuration that are interesting
+to a project.
+We recommend creating separate project sections for views apart from job
+configuration such that job configuration does not overlap with the view
+configuration.
+
+Example Usage:
+
+.. code-block:: yaml
+
+ ---
+ - project:
+ name: project-view
+ views:
+ - common-view
+
+ project-name: project
+
+ - project:
+ name: project-stream1
+ jobs:
+ - '{project-name}-{seq}'
+
+ project: project
+ project-name: project
+ seq:
+ - a
+ - b
+
+ - project:
+ name: project-stream2
+ jobs:
+ - '{project-name}-{seq}'
+
+ project: project
+ project-name: project
+ seq:
+ - x
+ - y
+
+ - job-template:
+ name: '{project-name}-{seq}'
-Common view
------------
-Common view groups jobs related to a project and supports the following
-columns.
+Project view
+------------
+
+Groups all jobs owned by a project under one view by capturing jobs with the
+prefix of ``project-name``.
+
+This view uses the following columns:
:Columns:
- build-button
- jacoco
- find-bugs
- - robot-list
:Template Names:
- - common-view
- {project-name}
+ - project-view
: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-regex: Regex to match the jobs. (Generally set to '^{project-name}-.*'
- in defaults.yaml)
+ :project-name: The name of the project utilizing the view.
:Optional parameters:
:view-filter-queue: View filter queue. (default: false)
:view-recurse: View recurse. (default: false)
-Integration CSIT view
----------------------
+Example:
+
+.. literalinclude:: ../../.jjb-test/lf-project-view.yaml
+ :language: yaml
+
-Integration CSIT view provides a view for integration or CSIT jobs.
-The view supports the following set of columns.
+Common view
+-----------
+
+Groups all jobs owned by a project under one view by capturing jobs with the
+prefix of ``project-name``.
+
+This view uses the following columns:
+
+:Columns:
+
+ - status
+ - weather
+ - job
+ - last-success
+ - last-failure
+ - last-duration
+ - build-button
+ - jacoco
+ - find-bugs
+
+:Template Names:
+
+ - {view-name}
+ - common-view
+
+:Required parameters:
+
+ :view-name: The name of the view.
+ :view-regex: Regex to match the jobs.
+
+:Optional parameters:
+
+ :view-filter-executors: View filter executor. (default: false)
+ :view-filter-queue: View filter queue. (default: false)
+ :view-recurse: View recurse. (default: false)
+
+Example:
+
+.. literalinclude:: ../../.jjb-test/lf-common-view.yaml
+ :language: yaml
+
+
+CSIT view template
+------------------
+
+View template that loads columns useful for CSIT jobs.
+
+This view uses the following columns:
:Columns:
:Template Names:
- - integration-csit-view
- - {project-name}
+ - {view-name}
+ - csit-view
: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-regex: Regex to match the jobs. (Generally set to '^{project-name}-.*'
- in defaults.yaml)
+ :view-name: The name of the view.
+ :view-regex: Regex to match the jobs.
:Optional parameters:
+ :view-description: View description. (default: 'CSIT Jobs.')
:view-filter-executors: View filter executor. (default: false)
:view-filter-queue: View filter queue. (default: false)
:view-recurse: View recurse. (default: false)
+
+Example:
+
+.. literalinclude:: ../../.jjb-test/lf-csit-view.yaml
+ :language: yaml
# common view template #
########################
+- lf_view_common_columns: &lf_view_common_columns
+ name: lf-view-common-columns
+
+ columns:
+ - status
+ - weather
+ - job
+ - last-success
+ - last-failure
+ - last-duration
+ - build-button
+ - jacoco
+ - find-bugs
+
- view-template:
id: 'common-view'
- name: '{project-name}'
+ name: '{view-name}'
######################
# Default parameters #
######################
+ view-description: 'View using common-view template.'
view-filter-executors: false
view-filter-queue: false
view-recurse: false
######################
view-type: list
+ description: '{view-description}'
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}'
+ <<: *lf_view_common_columns
-#############################
-# integration view template #
-#############################
+######################
+# CSIT view template #
+######################
- view-template:
- id: 'integration-csit-view'
- name: '{project-name}'
+ id: 'csit-view'
+ name: '{view-name}'
######################
# Default parameters #
######################
+ view-description: 'CSIT jobs.'
view-filter-executors: false
view-filter-queue: false
view-recurse: false
######################
view-type: list
+ description: '{view-description}'
filter-executors: '{view-filter-executors}'
filter-queue: '{view-filter-queue}'
+ recurse: '{view-recurse}'
+ regex: '{view-regex}'
columns:
- status
- weather
- last-duration
- build-button
- robot-list
+
+#########################
+# project view template #
+#########################
+
+- view-template:
+ id: 'project-view'
+ name: '{project-name}'
+
+ ######################
+ # Default parameters #
+ ######################
+
+ view-filter-executors: false
+ view-filter-queue: false
+ view-recurse: false
+
+ ######################
+ # view Configuration #
+ ######################
+
+ view-type: list
+ description: 'List of jobs for {project-name}.'
+ filter-executors: '{view-filter-executors}'
+ filter-queue: '{view-filter-queue}'
recurse: '{view-recurse}'
- regex: '{view-regex}'
- description: '{view-description}'
+ regex: '^{project-name}-.*'
+ <<: *lf_view_common_columns
---
features:
- |
- New view-templates ``common-view`` and ``integration-csit-view`` are
+ New view-templates ``project-view``, ``common-view``, and ``csit-view`` are
available for projects to manage Jenkins views through code.
- To use the ``common-view`` template in a project.
-
- Usage:
+ To use the ``project-view`` template in a project:
.. code-block:: yaml
- project:
- ...
+ name: aaa-view
views:
- - common-view
+ - project-view
- To use the ``integration-csit-view`` template in a project.
+ project-name: aaa
- Usage:
+ To use the ``common-view`` template in a project:
.. code-block:: yaml
- project:
- ...
+ name: daily-builds
views:
- - integration-csit-view
+ - common-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.
+ view-name: Periodic
+ view-regex: '.*-periodic-.*'
- Usage:
+ To use the ``csit-view`` template in a project:
.. code-block:: yaml
- project:
- name: <project-name-view>
- project: <project>
- project-name: <project-name>
+ name: csit
views:
- - common-view
-
- Example Usage:
+ - csit-view
- .. code-block:: yaml
-
- ---
- - defaults:
- name: global
- view-regex: '^{project-name}-.*'
- view-description: 'default view description'
+ view-name: CSIT
+ view-regex: '.*csit.*'
- project:
- name: project-view
- project: project
- project-name: project
+ name: csit-1node
views:
- - common-view
-
- - project:
- name: project-stream1
- project: project
- project-name: project
- jobs:
- - '{project-name}-{seq}'
- seq:
- - a
- - b
+ - csit-view
- - project:
- name: project-stream2
- project: project
- project-name: project
- jobs:
- - '{project-name}-{seq}'
- seq:
- - x
- - y
+ view-name: CSIT-1node
+ view-regex: '.*-csit-1node-.*'
- - job-template:
- name: '{project-name}-{seq}'
+upgrade:
+ - |
+ Some LF projects are already using a ``common-view`` template in their
+ local ci-management repo. This ``common-view`` is called ``project-view``
+ in global-jjb so rename all instances of ``common-view`` to
+ ``project-view`` when upgrading and remove the local ``common-view``
+ view-template definition from ci-management.