3e56ef4dd3799834af9075bbeefabb65778bbf53
[releng.git] / jjb / xci / xci-verify-jobs.yml
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: false
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-.*-{distro}-merge-.*'
70             - 'openstack-bifrost-verify-{distro}-.*'
71             - 'xci-osa-verify-{distro}-.*'
72             - 'xci-osa-periodic-{distro}-.*'
73           block-level: 'NODE'
74       - throttle:
75           max-per-node: 2
76           max-total: 10
77           categories:
78             - xci-verify-virtual
79           option: category
80
81     wrappers:
82       - ssh-agent-wrapper
83       - build-timeout:
84           timeout: 240
85       - fix-workspace-permissions
86
87     scm:
88       - git-scm-gerrit
89
90     triggers:
91       - gerrit:
92           server-name: 'gerrit.opnfv.org'
93           trigger-on:
94             - patchset-created-event:
95                 exclude-drafts: 'false'
96                 exclude-trivial-rebase: 'false'
97                 exclude-no-code-change: 'true'
98             - draft-published-event
99             - comment-added-contains-event:
100                 comment-contains-value: 'recheck'
101             - comment-added-contains-event:
102                 comment-contains-value: 'reverify'
103           projects:
104             - project-compare-type: 'ANT'
105               project-pattern: 'releng-xci'
106               branches:
107                 - branch-compare-type: 'ANT'
108                   branch-pattern: '**/{branch}'
109               disable-strict-forbidden-file-verification: 'false'
110               forbidden-file-paths:
111                 - compare-type: ANT
112                   pattern: 'xci/scripts/vm/**'
113             - project-compare-type: 'ANT'
114               project-pattern: 'sfc|bgpvpn'
115               branches:
116                 - branch-compare-type: 'ANT'
117                   branch-pattern: '**/{branch}'
118               disable-strict-forbidden-file-verification: 'true'
119               file-paths:
120                 - compare-type: ANT
121                   pattern: 'scenarios/**'
122           readable-message: true
123           custom-url: '* $JOB_NAME $BUILD_URL'
124           skip-vote:
125             successful: '{obj:successful}'
126             failed: '{obj:failed}'
127             unstable: '{obj:unstable}'
128             notbuilt: '{obj:notbuilt}'
129
130     parameters:
131       - project-parameter:
132           project: '{project}'
133           branch: '{branch}'
134       - label:
135           name: SLAVE_LABEL
136           default: 'xci-virtual'
137       - string:
138           name: CLEAN_DIB_IMAGES
139           default: 'true'
140       - string:
141           name: GIT_BASE
142           default: https://gerrit.opnfv.org/gerrit/releng-xci
143           description: 'Git URL to use on this Jenkins Slave'
144
145     builders:
146       - 'xci-verify-set-scenario-macro'
147       - inject:
148           properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/scenario.properties"
149       - description-setter:
150           description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME"
151       - multijob:
152           name: deploy
153           condition: SUCCESSFUL
154           projects:
155             - name: 'xci-verify-{distro}-deploy-{type}-{stream}'
156               current-parameters: true
157               predefined-parameters: |
158                 DISTRO={distro}
159                 DEPLOY_SCENARIO=os-nosdn-nofeature
160                 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
161                 GERRIT_BRANCH=$GERRIT_BRANCH
162                 GERRIT_REFSPEC=$GERRIT_REFSPEC
163                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
164                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
165               node-parameters: true
166               kill-phase-on: FAILURE
167               abort-all-job: true
168       - multijob:
169           name: healthcheck
170           condition: SUCCESSFUL
171           projects:
172             - name: 'xci-verify-{distro}-healthcheck-{type}-{stream}'
173               current-parameters: true
174               predefined-parameters: |
175                 DISTRO={distro}
176                 DEPLOY_SCENARIO=os-nosdn-nofeature
177                 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
178                 FUNCTEST_MODE=tier
179                 FUNCTEST_TIER=healthcheck
180                 GERRIT_BRANCH=$GERRIT_BRANCH
181                 GERRIT_REFSPEC=$GERRIT_REFSPEC
182                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
183                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
184               node-parameters: true
185               kill-phase-on: NEVER
186               abort-all-job: true
187
188 - job-template:
189     name: 'xci-verify-{distro}-{phase}-{type}-{stream}'
190
191     disabled: false
192
193     concurrent: true
194
195     properties:
196       - logrotate-default
197       - build-blocker:
198           use-build-blocker: true
199           blocking-jobs:
200             - '.*-bifrost-verify-.*'
201             - '.*-bifrost-periodic-.*'
202             - 'osa-verify-.*'
203             - 'osa-periodic-.*'
204           block-level: 'NODE'
205
206     parameters:
207       - string:
208           name: PROJECT
209           default: 'releng-xci'
210       - string:
211           name: DISTRO
212           default: 'ubuntu'
213       - string:
214           name: DEPLOY_SCENARIO
215           default: 'os-nosdn-nofeature'
216       - string:
217           name: FUNCTEST_MODE
218           default: 'tier'
219       - string:
220           name: FUNCTEST_SUITE_NAME
221           default: 'healthcheck'
222       - string:
223           name: XCI_FLAVOR
224           default: 'mini'
225       - string:
226           name: CLEAN_DIB_IMAGES
227           default: 'true'
228       - string:
229           name: OPNFV_RELENG_DEV_PATH
230           default: $WORKSPACE/
231       - string:
232           name: INSTALLER_TYPE
233           default: 'osa'
234       - string:
235           name: GIT_BASE
236           default: https://gerrit.opnfv.org/gerrit/releng-xci
237           description: 'Git URL to use on this Jenkins Slave'
238
239     wrappers:
240       - inject:
241           properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/scenario.properties"
242       - ssh-agent-wrapper
243       - build-timeout:
244           timeout: 240
245       - fix-workspace-permissions
246
247     scm:
248       - git-scm-gerrit
249
250     builders:
251       - description-setter:
252           description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME"
253       - 'xci-verify-{phase}-macro'
254
255 # -------------------------------
256 # builder macros
257 # -------------------------------
258 - builder:
259     name: 'xci-verify-set-scenario-macro'
260     builders:
261       - shell:
262           !include-raw: ./xci-set-scenario.sh
263
264 - builder:
265     name: 'xci-verify-deploy-macro'
266     builders:
267       - shell:
268           !include-raw: ./xci-start-new-vm.sh
269
270       - shell:
271           !include-raw: ./xci-start-deployment.sh
272
273 - builder:
274     name: 'xci-verify-healthcheck-macro'
275     builders:
276       - shell:
277           !include-raw: ./xci-cleanup.sh