[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-set-scenario-macro'
168       - inject:
169           properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties"
170       - description-setter:
171           description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME"
172       - multijob:
173           name: deploy
174           condition: SUCCESSFUL
175           projects:
176             - name: 'xci-verify-{distro}-deploy-{type}-{stream}'
177               current-parameters: true
178               predefined-parameters: |
179                 DISTRO={distro}
180                 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
181                 GERRIT_PROJECT=$GERRIT_PROJECT
182                 GERRIT_BRANCH=$GERRIT_BRANCH
183                 GERRIT_REFSPEC=$GERRIT_REFSPEC
184                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
185                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
186                 CI_LOOP=$CI_LOOP
187                 FUNCTEST_VERSION=$FUNCTEST_VERSION
188                 FUNCTEST_MODE=$FUNCTEST_MODE
189                 FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
190               node-parameters: true
191               kill-phase-on: FAILURE
192               abort-all-job: true
193       - multijob:
194           name: healthcheck
195           condition: SUCCESSFUL
196           projects:
197             - name: 'xci-verify-{distro}-healthcheck-{type}-{stream}'
198               current-parameters: true
199               predefined-parameters: |
200                 DISTRO={distro}
201                 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
202                 GERRIT_PROJECT=$GERRIT_PROJECT
203                 GERRIT_BRANCH=$GERRIT_BRANCH
204                 GERRIT_REFSPEC=$GERRIT_REFSPEC
205                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
206                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
207                 CI_LOOP=$CI_LOOP
208                 FUNCTEST_VERSION=$FUNCTEST_VERSION
209                 FUNCTEST_MODE=$FUNCTEST_MODE
210                 FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
211               node-parameters: true
212               kill-phase-on: NEVER
213               abort-all-job: true
214
215     publishers:
216       - postbuildscript:
217           builders:
218             - role: BOTH
219               build-on:
220                 - ABORTED
221                 - FAILURE
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-set-scenario-macro'
302     builders:
303       - shell:
304           !include-raw: ./xci-set-scenario.sh
305
306 - builder:
307     name: 'xci-verify-deploy-macro'
308     builders:
309       - shell:
310           !include-raw: ./xci-start-new-vm.sh
311
312       - shell:
313           !include-raw: ./xci-start-deployment.sh
314
315 - builder:
316     name: 'xci-verify-healthcheck-macro'
317     builders:
318       - shell:
319           !include-raw: ./xci-run-functest.sh