Disable post-merge jobs
[releng.git] / jjb / xci / xci-merge-jobs.yaml
1 ---
2 - project:
3     name: 'opnfv-xci-merge'
4
5     project: releng-xci
6     # -------------------------------
7     # branches
8     # -------------------------------
9     stream:
10       - master:
11           branch: '{stream}'
12           disabled: true
13     # -------------------------------
14     # distros
15     # -------------------------------
16     distro:
17       - ubuntu:
18           disabled: true
19           kill-phase-on: FAILURE
20           abort-all-job: true
21       - centos:
22           disabled: true
23           kill-phase-on: NEVER
24           abort-all-job: false
25       - opensuse:
26           disabled: true
27           kill-phase-on: FAILURE
28           abort-all-job: true
29     # -------------------------------
30     # postmerge promotion phases
31     # -------------------------------
32     phase:
33       - 'deploy'
34       - 'healthcheck'
35     # -------------------------------
36     # jobs
37     # -------------------------------
38     jobs:
39       - 'xci-merge-virtual-{stream}'
40       - 'xci-merge-promote-virtual-{stream}'
41       - 'xci-merge-{distro}-virtual-{stream}'
42       - 'xci-merge-{distro}-{phase}-virtual-{stream}'
43 # -------------------------------
44 # job templates
45 # -------------------------------
46 - job-template:
47     name: 'xci-merge-virtual-{stream}'
48
49     project-type: multijob
50
51     disabled: '{obj:disabled}'
52
53     concurrent: false
54
55     properties:
56       - logrotate-default
57
58     wrappers:
59       - ssh-agent-wrapper
60       - build-timeout:
61           timeout: 240
62       - fix-workspace-permissions
63
64     scm:
65       - git-scm-gerrit
66
67     triggers:
68       - gerrit:
69           server-name: 'gerrit.opnfv.org'
70           trigger-on:
71             - change-merged-event
72             - comment-added-contains-event:
73                 comment-contains-value: 'remerge'
74           projects:
75             - project-compare-type: 'ANT'
76               project-pattern: 'releng-xci'
77               branches:
78                 - branch-compare-type: 'ANT'
79                   branch-pattern: '**/{branch}'
80               disable-strict-forbidden-file-verification: 'false'
81               forbidden-file-paths:
82                 - compare-type: ANT
83                   pattern: 'xci/scripts/vm/**'
84                 - compare-type: ANT
85                   pattern: 'docs/**'
86                 - compare-type: ANT
87                   pattern: 'prototypes/**'
88                 - compare-type: ANT
89                   pattern: 'upstream/**'
90                 - compare-type: ANT
91                   pattern: 'INFO.yaml'
92             - project-compare-type: 'REG_EXP'
93               project-pattern: 'sfc|sdnvpn|releng-xci-scenarios'
94               branches:
95                 - branch-compare-type: 'ANT'
96                   branch-pattern: '**/{branch}'
97               disable-strict-forbidden-file-verification: 'true'
98               file-paths:
99                 - compare-type: ANT
100                   pattern: 'scenarios/**'
101           readable-message: true
102           custom-url: '* $JOB_NAME $BUILD_URL'
103
104     parameters:
105       - project-parameter:
106           project: $GERRIT_PROJECT
107           branch: '{branch}'
108       - label:
109           name: SLAVE_LABEL
110           default: 'xci-virtual'
111           all-nodes: false
112           node-eligibility: 'ignore-offline'
113       - string:
114           name: CI_LOOP
115           default: 'merge'
116       - string:
117           name: FUNCTEST_MODE
118           default: 'tier'
119       - string:
120           name: FUNCTEST_SUITE_NAME
121           default: 'healthcheck'
122       - string:
123           name: DISTRO
124           default: 'all'
125       - string:
126           name: CLEAN_DIB_IMAGES
127           default: 'true'
128       - string:
129           name: GIT_BASE
130           default: https://gerrit.opnfv.org/gerrit/$PROJECT
131           description: 'Git URL to use on this Jenkins Slave'
132
133     builders:
134       - 'xci-merge-set-scenario-macro'
135       - inject:
136           properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties"
137       - description-setter:
138           description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME"
139       - multijob:
140           name: deploy and test
141           condition: SUCCESSFUL
142           projects:
143             - name: 'xci-merge-opensuse-virtual-{stream}'
144               current-parameters: false
145               predefined-parameters: |
146                 DISTRO=opensuse
147                 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
148                 GERRIT_PROJECT=$GERRIT_PROJECT
149                 GERRIT_BRANCH=$GERRIT_BRANCH
150                 GERRIT_REFSPEC=$GERRIT_REFSPEC
151                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
152                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
153                 CI_LOOP=$CI_LOOP
154                 FUNCTEST_MODE=$FUNCTEST_MODE
155                 FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
156               node-parameters: false
157               kill-phase-on: FAILURE
158               abort-all-job: true
159             - name: 'xci-merge-ubuntu-virtual-{stream}'
160               current-parameters: false
161               predefined-parameters: |
162                 DISTRO=ubuntu
163                 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
164                 GERRIT_PROJECT=$GERRIT_PROJECT
165                 GERRIT_BRANCH=$GERRIT_BRANCH
166                 GERRIT_REFSPEC=$GERRIT_REFSPEC
167                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
168                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
169                 CI_LOOP=$CI_LOOP
170                 FUNCTEST_MODE=$FUNCTEST_MODE
171                 FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
172               node-parameters: false
173               kill-phase-on: FAILURE
174               abort-all-job: true
175             - name: 'xci-merge-centos-virtual-{stream}'
176               current-parameters: false
177               predefined-parameters: |
178                 DISTRO=centos
179                 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
180                 GERRIT_PROJECT=$GERRIT_PROJECT
181                 GERRIT_BRANCH=$GERRIT_BRANCH
182                 GERRIT_REFSPEC=$GERRIT_REFSPEC
183                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
184                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
185                 CI_LOOP=$CI_LOOP
186                 FUNCTEST_MODE=$FUNCTEST_MODE
187                 FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
188               node-parameters: false
189               kill-phase-on: NEVER
190               abort-all-job: false
191       - inject:
192           properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties"
193       - multijob:
194           name: promote
195           condition: SUCCESSFUL
196           projects:
197             - name: 'xci-merge-promote-virtual-{stream}'
198               current-parameters: true
199               predefined-parameters: |
200                 GERRIT_PROJECT=$GERRIT_PROJECT
201                 GERRIT_BRANCH=$GERRIT_BRANCH
202                 GERRIT_REFSPEC=$GERRIT_REFSPEC
203                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
204                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
205                 CI_LOOP=$CI_LOOP
206                 FUNCTEST_MODE=$FUNCTEST_MODE
207                 FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
208               node-parameters: true
209               kill-phase-on: NEVER
210               abort-all-job: true
211
212 - job-template:
213     name: 'xci-merge-{distro}-virtual-{stream}'
214
215     project-type: multijob
216
217     disabled: '{obj:disabled}'
218
219     concurrent: false
220
221     properties:
222       - logrotate-default
223       - build-blocker:
224           use-build-blocker: true
225           blocking-jobs:
226             - 'xci-verify-{distro}-.*'
227             - 'xci-merge-{distro}-.*'
228             - 'xci-os.*'
229             - 'xci-k8.*'
230             - 'openstack-bifrost-verify-{distro}-.*'
231             - 'xci-osa-verify-{distro}-.*'
232             - 'xci-osa-periodic-{distro}-.*'
233           blocking-level: 'NODE'
234       - throttle:
235           max-per-node: 1
236           max-total: 3
237           categories:
238             - xci-verify-virtual
239           option: category
240
241     wrappers:
242       - ssh-agent-wrapper
243       - build-timeout:
244           timeout: 240
245       - fix-workspace-permissions
246
247     scm:
248       - git-scm-gerrit
249
250     parameters:
251       - project-parameter:
252           project: $GERRIT_PROJECT
253           branch: '{branch}'
254       - label:
255           name: SLAVE_LABEL
256           default: 'xci-virtual'
257           all-nodes: false
258           node-eligibility: 'ignore-offline'
259       - string:
260           name: CI_LOOP
261           default: 'merge'
262       - string:
263           name: FUNCTEST_VERSION
264           default: 'hunter'
265       - string:
266           name: FUNCTEST_MODE
267           default: 'tier'
268       - string:
269           name: FUNCTEST_SUITE_NAME
270           default: 'healthcheck'
271       - string:
272           name: DISTRO
273           default: '{distro}'
274       - string:
275           name: CLEAN_DIB_IMAGES
276           default: 'true'
277       - string:
278           name: GIT_BASE
279           default: https://gerrit.opnfv.org/gerrit/$PROJECT
280           description: 'Git URL to use on this Jenkins Slave'
281
282     builders:
283       - 'xci-merge-set-scenario-macro'
284       - inject:
285           properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties"
286       - description-setter:
287           description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME"
288       - multijob:
289           name: deploy
290           condition: SUCCESSFUL
291           projects:
292             - name: 'xci-merge-{distro}-deploy-virtual-{stream}'
293               current-parameters: true
294               predefined-parameters: |
295                 DISTRO={distro}
296                 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
297                 GERRIT_PROJECT=$GERRIT_PROJECT
298                 GERRIT_BRANCH=$GERRIT_BRANCH
299                 GERRIT_REFSPEC=$GERRIT_REFSPEC
300                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
301                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
302                 FUNCTEST_VERSION=$FUNCTEST_VERSION
303                 FUNCTEST_MODE=$FUNCTEST_MODE
304                 FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
305               node-parameters: true
306               kill-phase-on: '{kill-phase-on}'
307               abort-all-job: '{abort-all-job}'
308       - multijob:
309           name: healthcheck
310           condition: SUCCESSFUL
311           projects:
312             - name: 'xci-merge-{distro}-healthcheck-virtual-{stream}'
313               current-parameters: true
314               predefined-parameters: |
315                 DISTRO={distro}
316                 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
317                 GERRIT_PROJECT=$GERRIT_PROJECT
318                 GERRIT_BRANCH=$GERRIT_BRANCH
319                 GERRIT_REFSPEC=$GERRIT_REFSPEC
320                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
321                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
322                 CI_LOOP=$CI_LOOP
323                 FUNCTEST_VERSION=$FUNCTEST_VERSION
324                 FUNCTEST_MODE=$FUNCTEST_MODE
325                 FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
326               node-parameters: true
327               kill-phase-on: '{kill-phase-on}'
328               abort-all-job: '{abort-all-job}'
329
330     publishers:
331       - postbuildscript:
332           builders:
333             - role: BOTH
334               build-on:
335                 - ABORTED
336                 - FAILURE
337                 - NOT_BUILT
338                 - SUCCESS
339                 - UNSTABLE
340               build-steps:
341                 - shell: !include-raw: ./xci-cleanup.sh
342           mark-unstable-if-failed: true
343
344 - job-template:
345     name: 'xci-merge-{distro}-{phase}-virtual-{stream}'
346
347     disabled: false
348
349     concurrent: false
350
351     properties:
352       - logrotate-default
353       - build-blocker:
354           use-build-blocker: true
355           blocking-jobs:
356             - '.*-bifrost-verify-.*'
357             - '.*-bifrost-periodic-.*'
358             - 'osa-verify-.*'
359             - 'osa-periodic-.*'
360           blocking-level: 'NODE'
361
362     parameters:
363       - string:
364           name: PROJECT
365           default: $GERRIT_PROJECT
366       - string:
367           name: DISTRO
368           default: 'ubuntu'
369       - string:
370           name: CI_LOOP
371           default: 'merge'
372       - string:
373           name: FUNCTEST_VERSION
374           default: 'hunter'
375       - string:
376           name: FUNCTEST_MODE
377           default: 'tier'
378       - string:
379           name: FUNCTEST_SUITE_NAME
380           default: 'healthcheck'
381       - string:
382           name: XCI_FLAVOR
383           default: 'mini'
384       - string:
385           name: CLEAN_DIB_IMAGES
386           default: 'true'
387       - string:
388           name: OPNFV_RELENG_DEV_PATH
389           default: $WORKSPACE/
390       - string:
391           name: GIT_BASE
392           default: https://gerrit.opnfv.org/gerrit/$PROJECT
393           description: 'Git URL to use on this Jenkins Slave'
394
395     wrappers:
396       - inject:
397           properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties"
398       - ssh-agent-wrapper
399       - build-timeout:
400           timeout: 240
401       - fix-workspace-permissions
402
403     scm:
404       - git-scm-gerrit
405
406     builders:
407       - description-setter:
408           description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME"
409       - 'xci-merge-{phase}-macro'
410
411 - job-template:
412     name: 'xci-merge-promote-virtual-{stream}'
413
414     disabled: false
415
416     concurrent: false
417
418     properties:
419       - logrotate-default
420
421     parameters:
422       - string:
423           name: PROJECT
424           default: $GERRIT_PROJECT
425       - string:
426           name: CI_LOOP
427           default: 'merge'
428       - string:
429           name: FUNCTEST_MODE
430           default: 'tier'
431       - string:
432           name: FUNCTEST_SUITE_NAME
433           default: 'healthcheck'
434       - string:
435           name: DISTRO
436           default: 'all'
437       - string:
438           name: OPNFV_RELENG_DEV_PATH
439           default: $WORKSPACE/
440       - string:
441           name: LOCAL_PROMOTION_METADATA_FILE
442           default: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties"
443       - string:
444           name: REMOTE_PROMOTION_METADATA_FILE
445           default: "gs://artifacts.opnfv.org/xci/pipeline/merge/$DEPLOY_SCENARIO.properties"
446       - string:
447           name: GIT_BASE
448           default: https://gerrit.opnfv.org/gerrit/$PROJECT
449           description: 'Git URL to use on this Jenkins Slave'
450
451     wrappers:
452       - inject:
453           properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties"
454       - ssh-agent-wrapper
455       - build-timeout:
456           timeout: 240
457       - fix-workspace-permissions
458
459     builders:
460       - description-setter:
461           description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME"
462       - 'xci-merge-promote-macro'
463
464 # -------------------------------
465 # builder macros
466 # -------------------------------
467 - builder:
468     name: 'xci-merge-set-scenario-macro'
469     builders:
470       - shell:
471           !include-raw: ./xci-set-scenario.sh
472
473 - builder:
474     name: 'xci-merge-deploy-macro'
475     builders:
476       - shell:
477           !include-raw: ./xci-start-new-vm.sh
478
479       - shell:
480           !include-raw: ./xci-start-deployment.sh
481
482 - builder:
483     name: 'xci-merge-healthcheck-macro'
484     builders:
485       - shell:
486           !include-raw: ./xci-run-functest.sh
487
488 - builder:
489     name: 'xci-merge-promote-macro'
490     builders:
491       - shell:
492           !include-raw: ./xci-promote.sh