Merge "[docs] Limit git submodule recurse to depth 1"
[releng.git] / jjb / xci / xci-verify-jobs.yaml
1 ---
2 - project:
3     name: 'opnfv-xci-verify'
4
5     project: releng-xci
6     # -------------------------------
7     # branches
8     # -------------------------------
9     stream:
10       - master:
11           branch: '{stream}'
12     # -------------------------------
13     # distros
14     # -------------------------------
15     distro:
16       - ubuntu:
17           disabled: false
18           successful: false
19           failed: false
20           unstable: false
21           notbuilt: false
22       - centos:
23           disabled: true
24           successful: true
25           failed: true
26           unstable: true
27           notbuilt: true
28       - opensuse:
29           disabled: false
30           successful: false
31           failed: false
32           unstable: false
33           notbuilt: false
34     # -------------------------------
35     # type
36     # -------------------------------
37     type:
38       - virtual
39     # -------------------------------
40     # patch verification phases
41     # -------------------------------
42     phase:
43       - 'deploy'
44       - 'healthcheck'
45     # -------------------------------
46     # jobs
47     # -------------------------------
48     jobs:
49       - 'xci-verify-{distro}-{type}-{stream}'
50       - 'xci-verify-{distro}-{phase}-{type}-{stream}'
51 # -------------------------------
52 # job templates
53 # -------------------------------
54 - job-template:
55     name: 'xci-verify-{distro}-{type}-{stream}'
56
57     project-type: multijob
58
59     disabled: '{obj:disabled}'
60
61     concurrent: true
62
63     properties:
64       - logrotate-default
65       - build-blocker:
66           use-build-blocker: true
67           blocking-jobs:
68             - 'xci-verify-{distro}-.*'
69             - 'xci-merge-{distro}-.*'
70             - 'xci-os-.*'
71             - 'xci-k8-.*'
72             - 'openstack-bifrost-verify-{distro}-.*'
73             - 'xci-osa-verify-{distro}-.*'
74             - 'xci-osa-periodic-{distro}-.*'
75           block-level: 'NODE'
76       - throttle:
77           max-per-node: 2
78           max-total: 10
79           categories:
80             - xci-verify-virtual
81           option: category
82
83     wrappers:
84       - ssh-agent-wrapper
85       - build-timeout:
86           timeout: 240
87       - fix-workspace-permissions
88
89     scm:
90       - git-scm-gerrit
91
92     triggers:
93       - gerrit:
94           server-name: 'gerrit.opnfv.org'
95           trigger-on:
96             - patchset-created-event:
97                 exclude-drafts: 'false'
98                 exclude-trivial-rebase: 'false'
99                 exclude-no-code-change: 'true'
100             - draft-published-event
101             - comment-added-contains-event:
102                 comment-contains-value: 'recheck'
103             - comment-added-contains-event:
104                 comment-contains-value: 'reverify'
105           projects:
106             - project-compare-type: 'ANT'
107               project-pattern: 'releng-xci'
108               branches:
109                 - branch-compare-type: 'ANT'
110                   branch-pattern: '**/{branch}'
111               disable-strict-forbidden-file-verification: 'false'
112               forbidden-file-paths:
113                 - compare-type: ANT
114                   pattern: 'xci/scripts/vm/**'
115                 - compare-type: ANT
116                   pattern: 'docs/**'
117                 - compare-type: ANT
118                   pattern: 'upstream/**'
119             - project-compare-type: 'REG_EXP'
120               project-pattern: 'sfc|sdnvpn|releng-xci-scenarios'
121               branches:
122                 - branch-compare-type: 'ANT'
123                   branch-pattern: '**/{branch}'
124               disable-strict-forbidden-file-verification: 'true'
125               file-paths:
126                 - compare-type: ANT
127                   pattern: 'scenarios/**'
128           readable-message: true
129           custom-url: '* $JOB_NAME $BUILD_URL'
130           skip-vote:
131             successful: '{obj:successful}'
132             failed: '{obj:failed}'
133             unstable: '{obj:unstable}'
134             notbuilt: '{obj:notbuilt}'
135
136     parameters:
137       - project-parameter:
138           project: $GERRIT_PROJECT
139           branch: '{branch}'
140       - label:
141           name: SLAVE_LABEL
142           default: 'xci-virtual'
143       - string:
144           name: DISTRO
145           default: '{distro}'
146       - string:
147           name: CLEAN_DIB_IMAGES
148           default: 'true'
149       - string:
150           name: CI_LOOP
151           default: 'verify'
152       - string:
153           name: FUNCTEST_VERSION
154           default: 'hunter'
155       - string:
156           name: FUNCTEST_MODE
157           default: 'tier'
158       - string:
159           name: FUNCTEST_SUITE_NAME
160           default: 'healthcheck'
161       - string:
162           name: GIT_BASE
163           default: https://gerrit.opnfv.org/gerrit/$PROJECT
164           description: 'Git URL to use on this Jenkins Slave'
165
166     builders:
167       - 'xci-verify-clean-vm-macro'
168       - 'xci-verify-set-scenario-macro'
169       - inject:
170           properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties"
171       - description-setter:
172           description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME"
173       - multijob:
174           name: deploy
175           condition: SUCCESSFUL
176           projects:
177             - name: 'xci-verify-{distro}-deploy-{type}-{stream}'
178               current-parameters: true
179               predefined-parameters: |
180                 DISTRO={distro}
181                 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
182                 GERRIT_PROJECT=$GERRIT_PROJECT
183                 GERRIT_BRANCH=$GERRIT_BRANCH
184                 GERRIT_REFSPEC=$GERRIT_REFSPEC
185                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
186                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
187                 CI_LOOP=$CI_LOOP
188                 FUNCTEST_VERSION=$FUNCTEST_VERSION
189                 FUNCTEST_MODE=$FUNCTEST_MODE
190                 FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
191               node-parameters: true
192               kill-phase-on: FAILURE
193               abort-all-job: true
194       - multijob:
195           name: healthcheck
196           condition: SUCCESSFUL
197           projects:
198             - name: 'xci-verify-{distro}-healthcheck-{type}-{stream}'
199               current-parameters: true
200               predefined-parameters: |
201                 DISTRO={distro}
202                 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
203                 GERRIT_PROJECT=$GERRIT_PROJECT
204                 GERRIT_BRANCH=$GERRIT_BRANCH
205                 GERRIT_REFSPEC=$GERRIT_REFSPEC
206                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
207                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
208                 CI_LOOP=$CI_LOOP
209                 FUNCTEST_VERSION=$FUNCTEST_VERSION
210                 FUNCTEST_MODE=$FUNCTEST_MODE
211                 FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
212               node-parameters: true
213               kill-phase-on: NEVER
214               abort-all-job: true
215
216     publishers:
217       - postbuildscript:
218           builders:
219             - role: BOTH
220               build-on:
221                 - ABORTED
222                 - NOT_BUILT
223                 - SUCCESS
224                 - UNSTABLE
225               build-steps:
226                 - shell: !include-raw: ./xci-cleanup.sh
227           mark-unstable-if-failed: true
228
229
230 - job-template:
231     name: 'xci-verify-{distro}-{phase}-{type}-{stream}'
232
233     disabled: false
234
235     concurrent: true
236
237     properties:
238       - logrotate-default
239       - build-blocker:
240           use-build-blocker: true
241           blocking-jobs:
242             - '.*-bifrost-verify-.*'
243             - '.*-bifrost-periodic-.*'
244             - 'osa-verify-.*'
245             - 'osa-periodic-.*'
246           block-level: 'NODE'
247
248     parameters:
249       - string:
250           name: PROJECT
251           default: $GERRIT_PROJECT
252       - string:
253           name: DISTRO
254           default: 'ubuntu'
255       - string:
256           name: CI_LOOP
257           default: 'verify'
258       - string:
259           name: FUNCTEST_VERSION
260           default: 'hunter'
261       - string:
262           name: FUNCTEST_MODE
263           default: 'tier'
264       - string:
265           name: FUNCTEST_SUITE_NAME
266           default: 'healthcheck'
267       - string:
268           name: XCI_FLAVOR
269           default: 'mini'
270       - string:
271           name: CLEAN_DIB_IMAGES
272           default: 'true'
273       - string:
274           name: OPNFV_RELENG_DEV_PATH
275           default: $WORKSPACE/
276       - string:
277           name: GIT_BASE
278           default: https://gerrit.opnfv.org/gerrit/$PROJECT
279           description: 'Git URL to use on this Jenkins Slave'
280
281     wrappers:
282       - inject:
283           properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties"
284       - ssh-agent-wrapper
285       - build-timeout:
286           timeout: 240
287       - fix-workspace-permissions
288
289     scm:
290       - git-scm-gerrit
291
292     builders:
293       - description-setter:
294           description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME"
295       - 'xci-verify-{phase}-macro'
296
297 # -------------------------------
298 # builder macros
299 # -------------------------------
300 - builder:
301     name: 'xci-verify-clean-vm-macro'
302     builders:
303       - shell:
304           !include-raw: ./xci-cleanup.sh
305
306 - builder:
307     name: 'xci-verify-set-scenario-macro'
308     builders:
309       - shell:
310           !include-raw: ./xci-set-scenario.sh
311
312 - builder:
313     name: 'xci-verify-deploy-macro'
314     builders:
315       - shell:
316           !include-raw: ./xci-start-new-vm.sh
317
318       - shell:
319           !include-raw: ./xci-start-deployment.sh
320
321 - builder:
322     name: 'xci-verify-healthcheck-macro'
323     builders:
324       - shell:
325           !include-raw: ./xci-run-functest.sh