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