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