xci: Do not run deployment for doc updates
[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-merge-{distro}-.*'
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                 - compare-type: ANT
114                   pattern: 'docs/**'
115             - project-compare-type: 'REG_EXP'
116               project-pattern: 'sfc|sdnvpn'
117               branches:
118                 - branch-compare-type: 'ANT'
119                   branch-pattern: '**/{branch}'
120               disable-strict-forbidden-file-verification: 'true'
121               file-paths:
122                 - compare-type: ANT
123                   pattern: 'scenarios/**'
124           readable-message: true
125           custom-url: '* $JOB_NAME $BUILD_URL'
126           skip-vote:
127             successful: '{obj:successful}'
128             failed: '{obj:failed}'
129             unstable: '{obj:unstable}'
130             notbuilt: '{obj:notbuilt}'
131
132     parameters:
133       - project-parameter:
134           project: $GERRIT_PROJECT
135           branch: '{branch}'
136       - label:
137           name: SLAVE_LABEL
138           default: 'xci-virtual'
139       - string:
140           name: DISTRO
141           default: '{distro}'
142       - string:
143           name: CLEAN_DIB_IMAGES
144           default: 'true'
145       - string:
146           name: GIT_BASE
147           default: https://gerrit.opnfv.org/gerrit/$PROJECT
148           description: 'Git URL to use on this Jenkins Slave'
149
150     builders:
151       - 'xci-verify-set-scenario-macro'
152       - inject:
153           properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties"
154       - description-setter:
155           description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME"
156       - multijob:
157           name: deploy
158           condition: SUCCESSFUL
159           projects:
160             - name: 'xci-verify-{distro}-deploy-{type}-{stream}'
161               current-parameters: true
162               predefined-parameters: |
163                 DISTRO={distro}
164                 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
165                 GERRIT_PROJECT=$GERRIT_PROJECT
166                 GERRIT_BRANCH=$GERRIT_BRANCH
167                 GERRIT_REFSPEC=$GERRIT_REFSPEC
168                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
169                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
170               node-parameters: true
171               kill-phase-on: FAILURE
172               abort-all-job: true
173       - multijob:
174           name: healthcheck
175           condition: SUCCESSFUL
176           projects:
177             - name: 'xci-verify-{distro}-healthcheck-{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                 FUNCTEST_MODE=tier
188                 FUNCTEST_TIER=healthcheck
189               node-parameters: true
190               kill-phase-on: NEVER
191               abort-all-job: true
192
193     publishers:
194       - postbuildscript:
195           script-only-if-succeeded: false
196           script-only-if-failed: false
197           builders:
198             - shell:
199                 !include-raw: ./xci-cleanup.sh
200
201
202 - job-template:
203     name: 'xci-verify-{distro}-{phase}-{type}-{stream}'
204
205     disabled: false
206
207     concurrent: true
208
209     properties:
210       - logrotate-default
211       - build-blocker:
212           use-build-blocker: true
213           blocking-jobs:
214             - '.*-bifrost-verify-.*'
215             - '.*-bifrost-periodic-.*'
216             - 'osa-verify-.*'
217             - 'osa-periodic-.*'
218           block-level: 'NODE'
219
220     parameters:
221       - string:
222           name: PROJECT
223           default: $GERRIT_PROJECT
224       - string:
225           name: DISTRO
226           default: 'ubuntu'
227       - string:
228           name: FUNCTEST_MODE
229           default: 'tier'
230       - string:
231           name: FUNCTEST_SUITE_NAME
232           default: 'healthcheck'
233       - string:
234           name: XCI_FLAVOR
235           default: 'mini'
236       - string:
237           name: CLEAN_DIB_IMAGES
238           default: 'true'
239       - string:
240           name: OPNFV_RELENG_DEV_PATH
241           default: $WORKSPACE/
242       - string:
243           name: GIT_BASE
244           default: https://gerrit.opnfv.org/gerrit/$PROJECT
245           description: 'Git URL to use on this Jenkins Slave'
246
247     wrappers:
248       - inject:
249           properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties"
250       - ssh-agent-wrapper
251       - build-timeout:
252           timeout: 240
253       - fix-workspace-permissions
254
255     scm:
256       - git-scm-gerrit
257
258     builders:
259       - description-setter:
260           description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME"
261       - 'xci-verify-{phase}-macro'
262
263 # -------------------------------
264 # builder macros
265 # -------------------------------
266 - builder:
267     name: 'xci-verify-set-scenario-macro'
268     builders:
269       - shell:
270           !include-raw: ./xci-set-scenario.sh
271
272 - builder:
273     name: 'xci-verify-deploy-macro'
274     builders:
275       - shell:
276           !include-raw: ./xci-start-new-vm.sh
277
278       - shell:
279           !include-raw: ./xci-start-deployment.sh
280
281 - builder:
282     name: 'xci-verify-healthcheck-macro'
283     builders:
284       - shell:
285           !include-raw: ./xci-run-functest.sh