Apex: Wildcard gerrit trigger for CSIT
[releng.git] / jjb / 3rd_party_ci / odl-netvirt.yaml
1 ---
2 - project:
3     name: 'netvirt'
4
5     project: 'netvirt'
6
7     installer: 'netvirt'
8     #####################################
9     # branch definitions
10     #####################################
11     stream:
12       - master:
13           branch: '{stream}'
14           gs-pathname: ''
15           disabled: false
16       - oxygen:
17           branch: 'stable/oxygen'
18           gs-pathname: ''
19           disabled: false
20     #####################################
21     # patch verification phases
22     #####################################
23     phase:
24       - 'create-apex-vms':
25           slave-label: 'apex-virtual-master'
26       - 'install-netvirt':
27           slave-label: 'apex-virtual-master'
28       - 'postprocess':
29           slave-label: 'apex-virtual-master'
30     #####################################
31     # jobs
32     #####################################
33     jobs:
34       - 'odl-netvirt-verify-virtual-{stream}'
35       - 'odl-netvirt-verify-virtual-{phase}-{stream}'
36
37 #####################################
38 # job templates
39 #####################################
40 - job-template:
41     name: 'odl-netvirt-verify-virtual-{stream}'
42
43     project-type: multijob
44
45     disabled: '{obj:disabled}'
46
47     concurrent: true
48
49     properties:
50       - logrotate-default
51       - throttle:
52           enabled: true
53           max-total: 5
54           max-per-node: 1
55           option: 'project'
56       - build-blocker:
57           use-build-blocker: true
58           blocking-jobs:
59             - 'apex-verify.*'
60             - 'apex-.*-promote.*'
61             - 'apex-virtual.*'
62             - 'odl-netvirt-verify-virtual-create-apex-vms-.*'
63             - 'odl-netvirt-verify-virtual-install-netvirt-.*'
64             - 'functest-netvirt-virtual-suite-.*'
65             - 'odl-netvirt-verify-virtual-postprocess-.*'
66           block-level: 'NODE'
67     scm:
68       - git:
69           url: https://gerrit.opnfv.org/gerrit/apex
70           branches:
71             - 'origin/master'
72           timeout: 15
73           wipe-workspace: true
74
75     parameters:
76       - project-parameter:
77           project: '{project}'
78           branch: '{branch}'
79       - string:
80           name: NETVIRT_ARTIFACT
81           default: distribution-karaf.tar.gz
82       - 'apex-virtual-master-defaults'
83
84     triggers:
85       - gerrit:
86           server-name: 'git.opendaylight.org'
87           trigger-on:
88             # yamllint disable rule:line-length
89             # - comment-added-contains-event:
90             #     comment-contains-value: 'https://jenkins.opendaylight.org/releng/job/netvirt-patch-test-current-carbon/.*?/ : SUCCESS'
91             # - comment-added-contains-event:
92             #     comment-contains-value: 'https://jenkins.opendaylight.org/releng/job/netvirt-patch-test-current-carbon/.*?/ : UNSTABLE'
93             # yamllint enable rule:line-length
94             - comment-added-contains-event:
95                 comment-contains-value: 'check-opnfv'
96           projects:
97             - project-compare-type: 'ANT'
98               project-pattern: '*'
99               branches:
100                 - branch-compare-type: 'ANT'
101                   branch-pattern: '**/{branch}'
102           readable-message: true
103
104     builders:
105       - description-setter:
106           description: "Built on $NODE_NAME"
107       - detect-opnfv-snapshot
108       - inject:
109           properties-file: detected_snapshot
110       - multijob:
111           name: create-apex-vms
112           condition: SUCCESSFUL
113           projects:
114             - name: 'odl-netvirt-verify-virtual-create-apex-vms-{stream}'
115               current-parameters: false
116               predefined-parameters: |
117                 BRANCH=$BRANCH
118                 GERRIT_REFSPEC=$GERRIT_REFSPEC
119                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
120                 GERRIT_CHANGE_ID=$GERRIT_CHANGE_ID
121                 GERRIT_PATCHSET_NUMBER=$GERRIT_PATCHSET_NUMBER
122                 GERRIT_PATCHSET_REVISION=$GERRIT_PATCHSET_REVISION
123                 NETVIRT_ARTIFACT=$NETVIRT_ARTIFACT
124                 APEX_ENV_NUMBER=$APEX_ENV_NUMBER
125                 GERRIT_EVENT_COMMENT_TEXT=$GERRIT_EVENT_COMMENT_TEXT
126                 TOPOLOGY=$TOPOLOGY
127                 OS_VERSION=$OS_VERSION
128               node-parameters: true
129               kill-phase-on: FAILURE
130               abort-all-job: true
131       - multijob:
132           name: install-netvirt
133           condition: SUCCESSFUL
134           projects:
135             - name: 'odl-netvirt-verify-virtual-install-netvirt-{stream}'
136               current-parameters: false
137               predefined-parameters: |
138                 ODL_BRANCH=$BRANCH
139                 BRANCH=$BRANCH
140                 GERRIT_REFSPEC=$GERRIT_REFSPEC
141                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
142                 GERRIT_CHANGE_ID=$GERRIT_CHANGE_ID
143                 GERRIT_PATCHSET_NUMBER=$GERRIT_PATCHSET_NUMBER
144                 GERRIT_PATCHSET_REVISION=$GERRIT_PATCHSET_REVISION
145                 GERRIT_PROJECT=$GERRIT_PROJECT
146                 NETVIRT_ARTIFACT=$NETVIRT_ARTIFACT
147                 TOPOLOGY=$TOPOLOGY
148                 OS_VERSION=$OS_VERSION
149               node-parameters: true
150               kill-phase-on: FAILURE
151               abort-all-job: true
152       - multijob:
153           name: csit
154           condition: ALWAYS
155           projects:
156             - name: cperf-apex-csit-master
157               predefined-parameters: |
158                 ODL_BRANCH=$BRANCH
159                 RC_FILE_PATH=$SNAP_CACHE/overcloudrc
160                 NODE_FILE_PATH=$SNAP_CACHE/node.yaml
161                 SSH_KEY_PATH=$SNAP_CACHE/id_rsa
162                 ODL_CONTAINERIZED=false
163                 OS_VERSION=$OS_VERSION
164               node-parameters: true
165               kill-phase-on: FAILURE
166               abort-all-job: false
167       - multijob:
168           name: csit-collect-logs
169           condition: ALWAYS
170           projects:
171             - name: cperf-upload-logs-csit
172               predefined-parameters: |
173                 ODL_BRANCH=$BRANCH
174                 OS_VERSION=$OS_VERSION
175               node-parameters: true
176               kill-phase-on: FAILURE
177               abort-all-job: false
178       - multijob:
179           name: postprocess
180           condition: ALWAYS
181           projects:
182             - name: 'odl-netvirt-verify-virtual-postprocess-{stream}'
183               current-parameters: false
184               predefined-parameters: |
185                 BRANCH=$BRANCH
186                 GERRIT_REFSPEC=$GERRIT_REFSPEC
187                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
188                 GERRIT_CHANGE_ID=$GERRIT_CHANGE_ID
189                 GERRIT_PATCHSET_NUMBER=$GERRIT_PATCHSET_NUMBER
190                 GERRIT_PATCHSET_REVISION=$GERRIT_PATCHSET_REVISION
191                 NETVIRT_ARTIFACT=$NETVIRT_ARTIFACT
192               node-parameters: true
193               kill-phase-on: FAILURE
194               abort-all-job: false
195
196 - job-template:
197     name: 'odl-netvirt-verify-virtual-{phase}-{stream}'
198
199     disabled: '{obj:disabled}'
200
201     concurrent: true
202
203     properties:
204       - logrotate-default
205       - throttle:
206           enabled: true
207           max-total: 5
208           max-per-node: 1
209           option: 'project'
210       - build-blocker:
211           use-build-blocker: true
212           blocking-jobs:
213             - 'odl-netvirt-verify-virtual-create-apex-vms-.*'
214             - 'odl-netvirt-verify-virtual-install-netvirt-.*'
215             - 'functest-netvirt-virtual-suite-.*'
216             - 'odl-netvirt-verify-virtual-postprocess-.*'
217           block-level: 'NODE'
218
219     wrappers:
220       - ssh-agent-wrapper
221       - timeout:
222           timeout: 360
223           fail: true
224
225     scm:
226       - git:
227           url: https://gerrit.opnfv.org/gerrit/apex
228           branches:
229             - 'origin/master'
230           timeout: 15
231           wipe-workspace: true
232
233     parameters:
234       - project-parameter:
235           project: '{project}'
236           branch: '{branch}'
237       - '{slave-label}-defaults'
238       - '{installer}-defaults'
239       - string:
240           name: DEPLOY_SCENARIO
241           default: 'os-odl-nofeature-noha'
242           description: 'Scenario to deploy and test'
243       - string:
244           name: GS_URL
245           default: artifacts.opnfv.org/apex
246           description: "URL to Google Storage with snapshot artifacts."
247
248     builders:
249       - description-setter:
250           description: "Built on $NODE_NAME"
251       - '{project}-verify-{phase}-builder'
252 #####################################
253 # builder macros
254 #####################################
255 - builder:
256     name: 'netvirt-verify-create-apex-vms-builder'
257     builders:
258       - shell:
259           !include-raw: ../apex/apex-snapshot-deploy.sh
260 - builder:
261     name: 'netvirt-verify-install-netvirt-builder'
262     builders:
263       - shell:
264           !include-raw: ./download-netvirt-artifact.sh
265       - shell:
266           !include-raw: ./install-netvirt.sh
267 - builder:
268     name: 'netvirt-verify-postprocess-builder'
269     builders:
270       - shell:
271           !include-raw: ./postprocess-netvirt.sh
272
273 - builder:
274     name: 'detect-opnfv-snapshot'
275     builders:
276       - shell:
277           !include-raw: ./detect-snapshot.sh