X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=docs%2Fjjb%2Flf-views.rst;h=7ed4936ce84eabaa58d3b7c9aff37e0ed89b3eb8;hb=35e5c8dbf87dc8657bfa1c2631d641f56d81ed07;hp=013dfbe5594060b40211024810a9092e992f58a9;hpb=f08880823d0d6e3e9ac62cd098af7b4c7661a8d6;p=releng%2Fglobal-jjb.git diff --git a/docs/jjb/lf-views.rst b/docs/jjb/lf-views.rst index 013dfbe5..7ed4936c 100644 --- a/docs/jjb/lf-views.rst +++ b/docs/jjb/lf-views.rst @@ -7,16 +7,62 @@ Jenkins Views 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. -Common view ------------ +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}' + + +Project view +------------ -Common view groups jobs related to a project and supports the following -columns. +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 @@ -26,32 +72,79 @@ columns. - build-button - jacoco - find-bugs - - robot-list :Template Names: - - common-view + - {project-name} + - project-view + +:Required parameters: + + :project-name: The name of the project utilizing the view. + +: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-project-view.yaml + :language: yaml + + +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: - :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) + :view-name: The name of the view. + :view-regex: Regex to match the jobs. + +:Optional parameters: -Integration CSIT view ---------------------- + :view-filter-executors: View filter executor. (default: false) + :view-filter-queue: View filter queue. (default: false) + :view-recurse: View recurse. (default: false) -Integration CSIT view provides a view for integration or CSIT jobs. -The view supports the following set of columns. +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: + - status - weather - job @@ -62,18 +155,23 @@ The view supports the following set of columns. - robot-list :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-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) + :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