Merge "Handle S3_BUCKET & CDN_URL in release jobs"
[releng/global-jjb.git] / docs / jjb / lf-views.rst
1 .. _lf-global-jjb-views:
2
3 #############
4 Jenkins Views
5 #############
6
7 View Templates
8 ==============
9
10 JJB view-templates provides a way to manage Jenkins views through code. Using
11 view-templates we can define common views configuration that are interesting
12 to a project.
13
14 We recommend creating separate project sections for views apart from job
15 configuration such that job configuration does not overlap with the view
16 configuration.
17
18 Example Usage:
19
20 .. code-block:: yaml
21
22    ---
23    - project:
24        name: project-view
25        views:
26          - common-view
27
28        project-name: project
29
30    - project:
31        name: project-stream1
32        jobs:
33          - '{project-name}-{seq}'
34
35        project: project
36        project-name: project
37        seq:
38          - a
39          - b
40
41    - project:
42        name: project-stream2
43        jobs:
44          - '{project-name}-{seq}'
45
46        project: project
47        project-name: project
48        seq:
49          - x
50          - y
51
52    - job-template:
53        name: '{project-name}-{seq}'
54
55
56 Project view
57 ------------
58
59 Groups all jobs owned by a project under one view by capturing jobs with the
60 prefix of ``project-name``.
61
62 This view uses the following columns:
63
64 :Columns:
65
66     - status
67     - weather
68     - job
69     - last-success
70     - last-failure
71     - last-duration
72     - build-button
73     - jacoco
74     - find-bugs
75
76 :Template Names:
77
78     - {project-name}
79     - project-view
80
81 :Required parameters:
82
83     :project-name: The name of the project utilizing the view.
84
85 :Optional parameters:
86
87     :view-filter-executors: View filter executor. (default: false)
88     :view-filter-queue: View filter queue. (default: false)
89     :view-recurse: View recurse. (default: false)
90
91 Example:
92
93 .. literalinclude:: ../../.jjb-test/lf-project-view.yaml
94    :language: yaml
95
96
97 Common view
98 -----------
99
100 Groups all jobs owned by a project under one view by capturing jobs with the
101 prefix of ``project-name``.
102
103 This view uses the following columns:
104
105 :Columns:
106
107    - status
108    - weather
109    - job
110    - last-success
111    - last-failure
112    - last-duration
113    - build-button
114    - jacoco
115    - find-bugs
116
117 :Template Names:
118
119    - {view-name}
120    - common-view
121
122 :Required parameters:
123
124    :view-name: The name of the view.
125    :view-regex: Regex to match the jobs.
126
127 :Optional parameters:
128
129    :view-filter-executors: View filter executor. (default: false)
130    :view-filter-queue: View filter queue. (default: false)
131    :view-recurse: View recurse. (default: false)
132
133 Example:
134
135 .. literalinclude:: ../../.jjb-test/lf-common-view.yaml
136   :language: yaml
137
138
139 CSIT view template
140 ------------------
141
142 View template that loads columns useful for CSIT jobs.
143
144 This view uses the following columns:
145
146 :Columns:
147
148     - status
149     - weather
150     - job
151     - last-success
152     - last-failure
153     - last-duration
154     - build-button
155     - robot-list
156
157 :Template Names:
158
159     - {view-name}
160     - csit-view
161
162 :Required parameters:
163
164     :view-name: The name of the view.
165     :view-regex: Regex to match the jobs.
166
167 :Optional parameters:
168
169     :view-description: View description. (default: 'CSIT Jobs.')
170     :view-filter-executors: View filter executor. (default: false)
171     :view-filter-queue: View filter queue. (default: false)
172     :view-recurse: View recurse. (default: false)
173
174 Example:
175
176 .. literalinclude:: ../../.jjb-test/lf-csit-view.yaml
177    :language: yaml