Merge "Add elalto to more build jobs"
[ci-management.git] / jjb / global-templates-script.yaml
1 ---
2 # vim: sw=2 ts=2 sts=2 et :
3
4 - job-template:
5     #
6     # job template for verifying gerrit changeset by shell script
7     #
8     # Required Variables:
9     #   project-name:   name of project
10     #   area:           area of project covered with this verification job
11     #   project:        name of scm repository to work on
12     #   stream:         name of stream used (set the same as branch if you're not sure)
13     #   branch:         git branch to work on
14     #   script:         build script to execute
15     # Optional Variables:
16     #   pattern:          trigger job only if modification covered file in pattern
17     #   build-node:     label(flavor) of jenkins slave
18     name: '{project-name}-{stream}-{area}-verify-shell'
19     node: '{build-node}'
20     type: freestyle
21
22     pattern: '**'
23
24     parameters:
25       - lf-infra-parameters:
26           branch: '{branch}'
27           project: '{project}'
28           stream: '{stream}'
29           lftools-version: '{lftools-version}'
30
31     scm:
32       - gerrit-trigger-scm:
33           refspec: '$GERRIT_REFSPEC'
34           submodule-recursive: '{submodule-recursive}'
35           choosing-strategy: 'gerrit'
36
37     triggers:
38       - gerrit-trigger-patch-submitted:
39           server: '{server-name}'
40           project: '{project}'
41           branch: '{branch}'
42           files: '{pattern}'
43
44     builders:
45       - shell: '{script}'
46
47     publishers:
48       - lf-infra-publish
49
50 - job-template:
51     # Job template for merging a submission.  triggered on
52     # gerrit-trigger-patch-merged, does scm, mvn with passed-in goals, then
53     # run script
54     # Required Variables:
55     #   branch:         git branch
56     #   script:         build script to execute
57     #   mvn-settings:   settings file for this specific job
58     #   mvn-goals:      space separated list of maven build goals (--version
59     #                   for noop, clean deploy for deploy [snapshot])
60     name: '{project-name}-{stream}-merge-scm-mvn-script'
61
62     project-type: freestyle
63     node: 'ubuntu1604-docker-8c-8g'
64
65     properties:
66       - infra-properties:
67           build-days-to-keep: '{build-days-to-keep}'
68
69     parameters:
70       - infra-parameters:
71           project: '{project}'
72           branch: '{branch}'
73           refspec: 'refs/heads/{branch}'
74           artifacts: '{archive-artifacts}'
75       - maven-exec:
76           maven-version: '{maven-version}'
77
78     scm:
79       - gerrit-trigger-scm:
80           refspec: ''
81           choosing-strategy: 'default'
82           submodule-recursive: '{submodule-recursive}'
83
84     wrappers:
85       - infra-wrappers:
86           build-timeout: '{build-timeout}'
87
88     triggers:
89       - gerrit-trigger-patch-merged:
90           server: '{server-name}'
91           project: '{project}'
92           branch: '{branch}'
93           files: '**'
94
95     builders:
96       - lf-infra-pre-build
97       - provide-maven-settings:
98           global-settings-file: 'global-settings'
99           settings-file: '{mvn-settings}'
100       - maven-target:
101           maven-version: '{maven-version}'
102           goals: '{mvn-goals}'
103           settings: '{mvn-settings}'
104           settings-type: cfp
105           global-settings: 'global-settings'
106           global-settings-type: cfp
107       - docker-login
108       - shell: '{script}'
109
110     publishers:
111       - infra-shiplogs:
112           maven-version: '{maven-version}'
113
114
115 - job-template:
116     # Job template for 2 scm and script trigger
117     #
118     # Required Variables:
119     #   branch:         git branch
120     #   build-node:     what build node to run on
121     #   script:         build script to execute
122     #   extra-project:  extra gerrit project to checkout
123     #   extra-refspec:  refspec for the extra project
124     #   extra-branch:   branch to checkout for the extra project
125     #   checkout-dir:   directory to checkout the extra project to
126     #                     DO NOT SET THIS TO anything that translates to
127     #                     $WORKSPACE as it will destroy the initial
128     #                     project checkout
129
130     name: '{project-name}-{stream}-two-scm-verify-script'
131
132     project-type: freestyle
133     concurrent: true
134     node: '{build-node}'
135
136     properties:
137       - infra-properties:
138           build-days-to-keep: '{build-days-to-keep}'
139
140     parameters:
141       - infra-parameters:
142           project: '{project}'
143           branch: '{branch}'
144           refspec: 'refs/heads/{branch}'
145           artifacts: '{archive-artifacts}'
146       - maven-exec:
147           maven-version: '{maven-version}'
148
149     scm:
150       - gerrit-trigger-scm:
151           refspec: '$GERRIT_REFSPEC'
152           choosing-strategy: 'gerrit'
153           submodule-recursive: '{submodule-recursive}'
154       - git-extra-project:
155           project: '{extra-project}'
156           refspec: '{extra-refspec}'
157           branch: '{extra-branch}'
158           checkout-dir: '{checkout-dir}'
159
160     wrappers:
161       - infra-wrappers:
162           build-timeout: '{build-timeout}'
163
164     triggers:
165       - gerrit-trigger-patch-submitted:
166           server: '{server-name}'
167           project: '{project}'
168           branch: '{branch}'
169           files: '**'
170
171     builders:
172       - lf-infra-pre-build
173       - provide-maven-settings:
174           global-settings-file: 'global-settings'
175           settings-file: '{mvn-settings}'
176       # make sure maven gets installed / setup
177       - maven-target:
178           maven-version: '{maven-version}'
179           goals: '--version'
180           settings: '{mvn-settings}'
181           settings-type: cfp
182           global-settings: 'global-settings'
183           global-settings-type: cfp
184       - shell: '{script}'
185
186     publishers:
187       - infra-shiplogs:
188           maven-version: '{maven-version}'
189
190
191
192 # vim: sw=2 ts=2 sts=2 et :
193
194 - job-template:
195     # Job template for two scm and script trigger - for docker merge
196     #
197     # Required Variables:
198     #   branch:         git branch
199     #   build-node:     what build node to run on
200     #   script:         build script to execute
201
202     name: '{project-name}-{stream}-two-scm-merge-docker-script'
203
204     project-type: freestyle
205     concurrent: true
206     node: '{build-node}'
207
208     properties:
209       - infra-properties:
210           build-days-to-keep: '{build-days-to-keep}'
211
212     parameters:
213       - infra-parameters:
214           project: '{project}'
215           branch: '{branch}'
216           refspec: 'refs/heads/{branch}'
217           artifacts: '{archive-artifacts}'
218       - maven-exec:
219           maven-version: '{maven-version}'
220
221     scm:
222       - gerrit-trigger-scm:
223           refspec: ''
224           choosing-strategy: 'default'
225           submodule-recursive: '{submodule-recursive}'
226       - git-extra-project:
227           project: '{extra-project}'
228           refspec: '{extra-refspec}'
229           branch: '{extra-branch}'
230           checkout-dir: '{checkout-dir}'
231
232     wrappers:
233       - infra-wrappers:
234           build-timeout: '{build-timeout}'
235
236     triggers:
237       - gerrit-trigger-patch-merged:
238           server: '{server-name}'
239           project: '{project}'
240           branch: '{branch}'
241           files: '**'
242
243     builders:
244       - lf-infra-pre-build
245       - provide-maven-settings:
246           global-settings-file: 'global-settings'
247           settings-file: '{mvn-settings}'
248       - docker-login
249       # make sure maven gets installed / setup
250       - maven-target:
251           maven-version: '{maven-version}'
252           goals: '--version'
253           settings: '{mvn-settings}'
254           settings-type: cfp
255           global-settings: 'global-settings'
256           global-settings-type: cfp
257       - shell: '{script}'
258
259     publishers:
260       - infra-shiplogs:
261           maven-version: '{maven-version}'
262
263 - job-template:
264     # Job template for two scm and script trigger - for docker daily release
265     #
266     # Required Variables:
267     #   branch:         git branch
268     #   build-node:     what build node to run on
269     #   script:         build script to execute
270
271     name: '{project-name}-{stream}-two-scm-release-docker-script-manual'
272
273     project-type: freestyle
274     concurrent: true
275     node: '{build-node}'
276
277     properties:
278       - infra-properties:
279           build-days-to-keep: '{build-days-to-keep}'
280
281     parameters:
282       - infra-parameters:
283           project: '{project}'
284           branch: '{branch}'
285           refspec: 'refs/heads/{branch}'
286           artifacts: '{archive-artifacts}'
287       - maven-exec:
288           maven-version: '{maven-version}'
289
290     scm:
291       - gerrit-trigger-scm:
292           refspec: ''
293           choosing-strategy: 'default'
294           submodule-recursive: '{submodule-recursive}'
295       - git-extra-project:
296           project: '{extra-project}'
297           refspec: '{extra-refspec}'
298           branch: '{extra-branch}'
299           checkout-dir: '{checkout-dir}'
300
301     wrappers:
302       - infra-wrappers:
303           build-timeout: '{build-timeout}'
304
305     triggers:
306       - gerrit-trigger-release-manually:
307           server: '{server-name}'
308           project: '{project}'
309           branch: '{branch}'
310
311     builders:
312       - lf-infra-pre-build
313       - provide-maven-settings:
314           global-settings-file: 'global-settings'
315           settings-file: '{mvn-settings}'
316       - docker-login
317       # make sure maven gets installed / setup
318       - maven-target:
319           maven-version: '{maven-version}'
320           goals: '--version'
321           settings: '{mvn-settings}'
322           settings-type: cfp
323           global-settings: 'global-settings'
324           global-settings-type: cfp
325       - shell: '{script}'
326
327     publishers:
328       - infra-shiplogs:
329           maven-version: '{maven-version}'
330
331 - job-template:
332     # 1. PULL the desired image
333     # 2. TAG it to the desired release name
334     # 3. PUSH the newly tagged image on release repo
335
336     name: '{project-name}-docker-image-blessing'
337
338     project-type: freestyle
339     concurrent: true
340     node: 'ubuntu1604-docker-8c-8g'
341
342     parameters:
343       - string:
344           name: X
345           description: "x VERSION of the STAGING image to bless into this RELEASE VERSION
346             Example : 1"
347       - string:
348           name: Y
349           description: "y VERSION of the STAGING image to bless into this RELEASE VERSION
350             Example : 2"
351       - string:
352           name: Z
353           description: "z VERSION of the RELEASE VERSION
354             Example : 3"
355       - string:
356           name: PROJECT
357           default: '{project}'
358
359     properties:
360       - infra-properties:
361           build-days-to-keep: '{build-days-to-keep}'
362
363     wrappers:
364       - infra-wrappers:
365           build-timeout: '{build-timeout}'
366
367     builders:
368       - lf-infra-pre-build
369       - provide-maven-settings:
370           global-settings-file: 'global-settings'
371           settings-file: '{mvn-settings}'
372       - docker-login
373       - shell: !include-raw: include-docker-blessing.sh
374
375     publishers:
376       - infra-shiplogs:
377           maven-version: '{maven-version}'