jjb: xci: Add missing job blockers for XCI merge jobs
[releng.git] / jjb / xci / xci-merge-jobs.yml
1 ---
2 - project:
3     name: 'opnfv-xci-merge'
4
5     # -------------------------------
6     # branches
7     # -------------------------------
8     stream:
9       - master:
10           branch: '{stream}'
11     # -------------------------------
12     # distros
13     # -------------------------------
14     distro:
15       - ubuntu:
16           disabled: false
17       - centos:
18           disabled: false
19       - opensuse:
20           disabled: false
21     # -------------------------------
22     # type
23     # -------------------------------
24     type:
25       - virtual
26     # -------------------------------
27     # patch verification phases
28     # -------------------------------
29     phase:
30       - 'deploy'
31       - 'healthcheck'
32       - 'promote'
33     # -------------------------------
34     # scenarios
35     # -------------------------------
36     scenario:
37       - 'os-odl-sfc':
38           project: sfc
39     # -------------------------------
40     # jobs
41     # -------------------------------
42     jobs:
43       - 'xci-{scenario}-{type}-{distro}-merge-{stream}'
44       - 'xci-{phase}-{type}-{distro}-merge-{stream}'
45 # -------------------------------
46 # job templates
47 # -------------------------------
48 - job-template:
49     name: 'xci-{scenario}-{type}-{distro}-merge-{stream}'
50
51     project-type: multijob
52
53     disabled: '{obj:disabled}'
54
55     concurrent: false
56
57     properties:
58       - logrotate-default
59       - build-blocker:
60           use-build-blocker: true
61           blocking-jobs:
62             - 'xci-verify-{distro}-.*'
63             - 'xci-.*-{distro}-merge-.*'
64             - 'bifrost-verify-{distro}-.*'
65             - 'bifrost-periodic-{distro}-.*'
66             - 'xci-osa-verify-{distro}-.*'
67             - 'xci-osa-periodic-{distro}-.*'
68             - 'xci-(os|k8s).*?-virtual-{distro}-.*'
69           block-level: 'NODE'
70       - throttle:
71           max-per-node: 2
72           max-total: 10
73           categories:
74             - xci-merge-virtual
75           option: category
76
77     wrappers:
78       - ssh-agent-wrapper
79       - build-timeout:
80           timeout: 240
81       - fix-workspace-permissions
82
83     scm:
84       - git:
85           credentials-id: '$SSH_CREDENTIAL_ID'
86           url: 'https://gerrit.opnfv.org/gerrit/releng-xci'
87           branches:
88             - 'origin/master'
89           timeout: 15
90
91     triggers:
92       - gerrit:
93           server-name: 'gerrit.opnfv.org'
94           trigger-on:
95             - change-merged-event
96             - comment-added-contains-event:
97                 comment-contains-value: 'remerge'
98           projects:
99             - project-compare-type: 'ANT'
100               project-pattern: '{obj:project}'
101               branches:
102                 - branch-compare-type: 'ANT'
103                   branch-pattern: '**/{branch}'
104               disable-strict-forbidden-file-verification: 'true'
105               file-paths:
106                 - compare-type: ANT
107                   pattern: 'scenarios/**'
108           readable-message: true
109           custom-url: '* $JOB_NAME $BUILD_URL'
110
111     parameters:
112       - project-parameter:
113           project: '{obj:project}'
114           branch: '{branch}'
115       - label:
116           name: SLAVE_LABEL
117           default: 'xci-virtual'
118       - string:
119           name: DEPLOY_SCENARIO
120           default: '{scenario}'
121       - string:
122           name: CLEAN_DIB_IMAGES
123           default: 'true'
124       - string:
125           name: GIT_BASE
126           default: https://gerrit.opnfv.org/gerrit/$PROJECT
127           description: 'Git URL to use on this Jenkins Slave'
128
129     builders:
130       - description-setter:
131           description: "Built on $NODE_NAME"
132       - multijob:
133           name: deploy
134           condition: SUCCESSFUL
135           projects:
136             - name: 'xci-deploy-{type}-{distro}-merge-{stream}'
137               current-parameters: true
138               predefined-parameters: |
139                 PROJECT=$PROJECT
140                 DISTRO={distro}
141                 DEPLOY_SCENARIO={scenario}
142                 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
143                 GERRIT_BRANCH=$GERRIT_BRANCH
144                 GERRIT_REFSPEC=$GERRIT_REFSPEC
145                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
146                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
147               node-parameters: true
148               kill-phase-on: FAILURE
149               abort-all-job: true
150       - multijob:
151           name: healthcheck
152           condition: SUCCESSFUL
153           projects:
154             - name: 'xci-healthcheck-{type}-{distro}-merge-{stream}'
155               current-parameters: true
156               predefined-parameters: |
157                 PROJECT=$PROJECT
158                 DISTRO={distro}
159                 DEPLOY_SCENARIO={scenario}
160                 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
161                 FUNCTEST_MODE=tier
162                 FUNCTEST_TIER=healthcheck
163                 GERRIT_BRANCH=$GERRIT_BRANCH
164                 GERRIT_REFSPEC=$GERRIT_REFSPEC
165                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
166                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
167               node-parameters: true
168               kill-phase-on: NEVER
169               abort-all-job: true
170
171 - job-template:
172     name: 'xci-{phase}-{type}-{distro}-merge-{stream}'
173
174     disabled: false
175
176     concurrent: true
177
178     properties:
179       - logrotate-default
180       - build-blocker:
181           use-build-blocker: true
182           blocking-jobs:
183             - '.*-bifrost-verify-.*'
184             - '.*-bifrost-periodic-.*'
185             - 'osa-verify-.*'
186             - 'osa-periodic-.*'
187           block-level: 'NODE'
188
189     parameters:
190       - string:
191           name: PROJECT
192           default: 'releng-xci'
193       - string:
194           name: DISTRO
195           default: 'ubuntu'
196       - string:
197           name: DEPLOY_SCENARIO
198           default: 'os-nosdn-nofeature-noha'
199       - string:
200           name: FUNCTEST_MODE
201           default: 'tier'
202       - string:
203           name: FUNCTEST_SUITE_NAME
204           default: 'healthcheck'
205       - string:
206           name: XCI_FLAVOR
207           default: 'mini'
208       - string:
209           name: CLEAN_DIB_IMAGES
210           default: 'true'
211       - string:
212           name: OPNFV_RELENG_DEV_PATH
213           default: $WORKSPACE/
214       - string:
215           name: INSTALLER_TYPE
216           default: 'osa'
217       - string:
218           name: GIT_BASE
219           default: https://gerrit.opnfv.org/gerrit/$PROJECT
220           description: 'Git URL to use on this Jenkins Slave'
221
222     wrappers:
223       - ssh-agent-wrapper
224       - build-timeout:
225           timeout: 240
226       - fix-workspace-permissions
227
228     scm:
229       - git:
230           credentials-id: '$SSH_CREDENTIAL_ID'
231           url: 'https://gerrit.opnfv.org/gerrit/releng-xci'
232           branches:
233             - 'origin/master'
234           timeout: 15
235
236     builders:
237       - description-setter:
238           description: "Built on $NODE_NAME"
239       - 'xci-merge-{phase}-macro'
240
241 # -------------------------------
242 # builder macros
243 # -------------------------------
244 - builder:
245     name: 'xci-merge-deploy-macro'
246     builders:
247       - shell:
248           !include-raw: ./xci-start-new-vm.sh
249       - shell:
250           !include-raw: ./xci-start-deployment.sh
251
252 - builder:
253     name: 'xci-merge-healthcheck-macro'
254     builders:
255       - shell:
256           !include-raw: ./xci-run-functest.sh
257       - shell:
258           !include-raw: ./xci-cleanup.sh
259
260 - builder:
261     name: 'xci-merge-promote-macro'
262     builders:
263       - shell:
264           !include-raw: ./xci-promote.sh