a326af42ee8af75d98f5bacd326ee206044f83ca
[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: 'opnfv-test'
96           projects:
97             - project-compare-type: 'ANT'
98               project-pattern: '{project}'
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       - multijob:
108           name: create-apex-vms
109           condition: SUCCESSFUL
110           projects:
111             - name: 'odl-netvirt-verify-virtual-create-apex-vms-{stream}'
112               current-parameters: false
113               predefined-parameters: |
114                 BRANCH=$BRANCH
115                 GERRIT_REFSPEC=$GERRIT_REFSPEC
116                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
117                 GERRIT_CHANGE_ID=$GERRIT_CHANGE_ID
118                 GERRIT_PATCHSET_NUMBER=$GERRIT_PATCHSET_NUMBER
119                 GERRIT_PATCHSET_REVISION=$GERRIT_PATCHSET_REVISION
120                 NETVIRT_ARTIFACT=$NETVIRT_ARTIFACT
121                 APEX_ENV_NUMBER=$APEX_ENV_NUMBER
122               node-parameters: true
123               kill-phase-on: FAILURE
124               abort-all-job: true
125       - multijob:
126           name: install-netvirt
127           condition: SUCCESSFUL
128           projects:
129             - name: 'odl-netvirt-verify-virtual-install-netvirt-{stream}'
130               current-parameters: false
131               predefined-parameters: |
132                 ODL_BRANCH={branch}
133                 BRANCH=$BRANCH
134                 GERRIT_REFSPEC=$GERRIT_REFSPEC
135                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
136                 GERRIT_CHANGE_ID=$GERRIT_CHANGE_ID
137                 GERRIT_PATCHSET_NUMBER=$GERRIT_PATCHSET_NUMBER
138                 GERRIT_PATCHSET_REVISION=$GERRIT_PATCHSET_REVISION
139                 NETVIRT_ARTIFACT=$NETVIRT_ARTIFACT
140               node-parameters: true
141               kill-phase-on: FAILURE
142               abort-all-job: true
143       - multijob:
144           name: functest
145           condition: SUCCESSFUL
146           projects:
147             - name: 'functest-netvirt-virtual-suite-master'
148               predefined-parameters: |
149                 DEPLOY_SCENARIO=os-odl-nofeature-ha
150                 FUNCTEST_MODE=testcase
151                 FUNCTEST_SUITE_NAME=tempest_smoke
152                 RC_FILE_PATH=$HOME/cloner-info/overcloudrc
153               node-parameters: true
154               kill-phase-on: FAILURE
155               abort-all-job: false
156       - multijob:
157           name: postprocess
158           condition: ALWAYS
159           projects:
160             - name: 'odl-netvirt-verify-virtual-postprocess-{stream}'
161               current-parameters: false
162               predefined-parameters: |
163                 BRANCH=$BRANCH
164                 GERRIT_REFSPEC=$GERRIT_REFSPEC
165                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
166                 GERRIT_CHANGE_ID=$GERRIT_CHANGE_ID
167                 GERRIT_PATCHSET_NUMBER=$GERRIT_PATCHSET_NUMBER
168                 GERRIT_PATCHSET_REVISION=$GERRIT_PATCHSET_REVISION
169                 NETVIRT_ARTIFACT=$NETVIRT_ARTIFACT
170               node-parameters: true
171               kill-phase-on: FAILURE
172               abort-all-job: false
173
174 - job-template:
175     name: 'odl-netvirt-verify-virtual-{phase}-{stream}'
176
177     disabled: '{obj:disabled}'
178
179     concurrent: true
180
181     properties:
182       - logrotate-default
183       - throttle:
184           enabled: true
185           max-total: 5
186           max-per-node: 1
187           option: 'project'
188       - build-blocker:
189           use-build-blocker: true
190           blocking-jobs:
191             - 'odl-netvirt-verify-virtual-create-apex-vms-.*'
192             - 'odl-netvirt-verify-virtual-install-netvirt-.*'
193             - 'functest-netvirt-virtual-suite-.*'
194             - 'odl-netvirt-verify-virtual-postprocess-.*'
195           block-level: 'NODE'
196
197     wrappers:
198       - ssh-agent-wrapper
199       - timeout:
200           timeout: 360
201           fail: true
202
203     scm:
204       - git:
205           url: https://gerrit.opnfv.org/gerrit/apex
206           branches:
207             - 'origin/master'
208           timeout: 15
209           wipe-workspace: true
210
211     parameters:
212       - project-parameter:
213           project: '{project}'
214           branch: '{branch}'
215       - '{slave-label}-defaults'
216       - '{installer}-defaults'
217       - string:
218           name: DEPLOY_SCENARIO
219           default: 'os-odl-nofeature-noha'
220           description: 'Scenario to deploy and test'
221       - string:
222           name: GS_URL
223           default: artifacts.opnfv.org/apex
224           description: "URL to Google Storage with snapshot artifacts."
225
226     builders:
227       - description-setter:
228           description: "Built on $NODE_NAME"
229       - '{project}-verify-{phase}-builder'
230 #####################################
231 # builder macros
232 #####################################
233 - builder:
234     name: 'netvirt-verify-create-apex-vms-builder'
235     builders:
236       - shell:
237           !include-raw: ../apex/apex-snapshot-deploy.sh
238 - builder:
239     name: 'netvirt-verify-install-netvirt-builder'
240     builders:
241       - shell:
242           !include-raw: ./download-netvirt-artifact.sh
243       - shell:
244           !include-raw: ./install-netvirt.sh
245 - builder:
246     name: 'netvirt-verify-postprocess-builder'
247     builders:
248       - shell:
249           !include-raw: ./postprocess-netvirt.sh