2 # TODO: Make all bash constants more readable.
3 # e.g.: DISTRIBUTION_BRANCH instead of DISTROBRANCH.
6 name: integration-distribution-branch
11 description: 'Distribution GIT branch'
14 name: integration-bundleurl
18 default: '{bundleurl}'
19 description: 'URL to karaf distribution zip'
22 name: integration-jdk-version
26 default: '{jdkversion}'
27 description: 'Parameter to indicate JAVA Version'
30 name: integration-controller-scope
34 default: '{controller-scope}'
35 description: 'Feature Only or Feature All test'
38 name: integration-controller-features
41 name: CONTROLLERFEATURES
42 default: '{controller-features}'
43 description: 'Features to install in the controller separated by comma'
46 name: integration-distribution-stream
51 description: 'Distribution stream string, for suites to know which behavior to expect'
54 name: integration-stream-test-plan
58 default: '{stream-test-plan}'
59 description: 'Stream-specific test plan we will run'
62 name: integration-test-plan
66 default: '{test-plan}'
67 description: 'General test plan we will run unless stream-specific one is found'
70 name: integration-test-options
74 default: '{test-options}'
75 description: 'Robot command options'
78 name: integration-distribution-git-url
82 default: '{git-url}/integration/distribution'
83 description: 'Distribution GIT URL (do not modify)'
86 name: integration-patch-refspec
91 description: 'Integration Patch Refspec'
93 # Macro: integration-gerrit-scm
94 # Operation: this macro downloads a project gerrit
95 # Used by: all csit jobs
98 name: integration-gerrit-scm
101 credentials-id: 'opendaylight-jenkins-ssh'
108 choosing-strategy: 'gerrit'
110 # Macro: integration-distribution-scm
111 # Operation: this macro downloads the integration/distribution repo using distribution as basedir
112 # Used by: integration-patch-test-{stream} job template
115 name: integration-distribution-scm
118 credentials-id: 'opendaylight-jenkins-ssh'
119 basedir: 'distribution'
126 # Macro: integration-trigger-patch-submitted
127 # This is a single macro to use for all csit jobs who vote on every (relevant) patch set.
128 # Only 'recheck' trigger word is supported, it always triggers the full set of relevant jobs,
129 # in order to prevent Jenkins from starting only a subset and still voting Verified+1.
130 # Contrary to gerrit-trigger-patch-submitted, this votes +1 also on unstable runs.
132 # server: name of gerrit server to listen to
133 # project: pattern to match triggering projects
134 # branch: triggering branch name
135 # files: pattern to match triggering filepaths
137 name: integration-trigger-patch-submitted
140 server-name: '{server}'
142 - patchset-created-event:
143 exclude-drafts: 'true'
144 exclude-trivial-rebase: 'false'
145 exclude-no-code-change: 'true'
146 - draft-published-event
147 - comment-added-contains-event:
148 comment-contains-value: 'recheck'
150 gerrit-build-unstable-verified-value: +1
151 gerrit-build-unstable-codereview-value: 0
153 - project-compare-type: 'ANT'
154 project-pattern: '{project}'
156 - branch-compare-type: 'ANT'
157 branch-pattern: '**/{branch}'
159 - compare-type: 'ANT'
162 # Macro: integration-openstack-controller-mininet
163 # Operation: this macro will spin the controller and mininet vms
164 # Used by: {project}-csit-* job templates
167 name: integration-openstack-controller-mininet
171 - cloud-name: 'ODLRPC'
172 template-name: '{controller-image}'
173 count: '{controller-vms}'
174 - cloud-name: 'ODLRPC'
175 template-name: '{mininet-image}'
176 count: '{mininet-vms}'
178 # Macro: integration-openstack-controller-devstack
179 # Operation: this macro will spin the controller and devstack vms
180 # Used by: {project}-csit-openstack job templates
182 name: integration-openstack-controller-devstack
186 - cloud-name: 'ODLRPC'
187 template-name: '{controller-image}'
188 count: '{controller-vms}'
189 - cloud-name: 'ODLRPC'
190 template-name: '{openstack-image}'
191 count: '{openstack-vms}'
197 # Macro: integration-infra-stack
198 # Operation: Sets environment and then calls opendaylight-infra-stack to spin
199 # up csit lab using openstack-heat.
200 # Used by: {project}-csit-* job templates
203 name: integration-infra-stack
205 - integration-cleanup-workspace
208 # Setup openstack envirnoment file for use by
209 # the opendaylight-infra-stack macro
210 cat > $WORKSPACE/opendaylight-infra-environment.yaml << EOF
212 vm_0_count: {vm_0_count}
213 vm_0_flavor: {vm_0_flavor}
214 vm_0_image: {vm_0_image}
215 vm_1_count: {vm_1_count}
216 vm_1_flavor: {vm_1_flavor}
217 vm_1_image: {vm_1_image}
219 echo "Contents of opendaylight-infra-environment.yaml ..."
220 cat $WORKSPACE/opendaylight-infra-environment.yaml
221 - opendaylight-infra-stack:
222 stack-template: '{stack-template}'
224 # Macro: integration-infra-stack-3-type
225 # Operation: Sets environment and then calls opendaylight-infra-stack to spin
226 # up csit lab using openstack-heat.
227 # Used by: {project}-csit-* job templates
230 name: integration-infra-stack-3-type
232 - integration-cleanup-workspace
235 # Setup openstack envirnoment file for use by
236 # the opendaylight-infra-stack macro
237 cat > $WORKSPACE/opendaylight-infra-environment.yaml << EOF
239 vm_0_count: {vm_0_count}
240 vm_0_flavor: {vm_0_flavor}
241 vm_0_image: {vm_0_image}
242 vm_1_count: {vm_1_count}
243 vm_1_flavor: {vm_1_flavor}
244 vm_1_image: {vm_1_image}
245 vm_2_count: {vm_2_count}
246 vm_2_flavor: {vm_2_flavor}
247 vm_2_image: {vm_2_image}
249 echo "Contents of opendaylight-infra-environment.yaml ..."
250 cat $WORKSPACE/opendaylight-infra-environment.yaml
251 - opendaylight-infra-stack:
252 stack-template: 'csit-3-instance-type.yaml'
254 # Macro: integration-get-slave-addresses
255 # Operation: this macro gets the IP addresses of the dynamic vms
256 # Used by: {project}-csit-* job templates
259 name: integration-get-slave-addresses
261 - shell: !include-raw: include-raw-integration-get-slave-addresses.sh
263 # Macro: integration-get-bundle-vars
264 # Operation: this macro gets all bundle related variables
265 # Used by: {project}-csit-3node-* job templates
268 name: integration-get-bundle-vars
270 - shell: !include-raw: include-raw-integration-get-bundle-vars.sh
272 # Macro: integration-distribution-check
273 # Operation: this macro deploys the controller with all fetures
274 # Used by: {project}-distribution-check-{stream} job template
277 name: integration-distribution-check
279 - shell: !include-raw: include-raw-integration-distribution-check.sh
281 # Macro: integration-deploy-controller-verify
282 # Operation: this macro deploys the controller with all fetures
283 # Used by: distribution-deploy-{stream} job template
286 name: integration-deploy-controller-verify
288 - shell: !include-raw: include-raw-integration-deploy-controller-verify.sh
290 # Macro: integration-deploy-controller-offline
291 # Operation: this macro deploys the controller with no external repo configuration
292 # Used by: integration-distrbution-offline-{stream} job template
295 name: integration-deploy-controller-offline
297 - shell: !include-raw: include-raw-integration-deploy-controller-offline.sh
299 # Macro: integration-deply-controller-run-test
300 # Operation: this macro deploys single contoller and runs test
301 # Used by: {project}-csit-1node-* job templates
304 name: integration-deploy-controller-run-test
306 - shell: !include-raw: include-raw-integration-deploy-controller-run-test.sh
308 # Macro: integration-configure-clustering
309 # Operation: this macro configures the clustering
310 # Used by: {project}-csit-3node-* job templates
313 name: integration-configure-clustering
315 - shell: !include-raw: include-raw-integration-configure-clustering.sh
317 # Macro: integration-start-cluster-run-test
318 # Operation: this macro starts the 3-node cluster and runs test
319 # Used by: {project}-csit-3node-* job templates
322 name: integration-start-cluster-run-test
324 - shell: !include-raw: include-raw-integration-start-cluster-run-test.sh
326 # Macro: integration-get-bundle-url
327 # Operation: this macro gets the job generated distribution URL from distribution pom.xml
328 # Used by: integration-patch-test-{stream} job template
331 name: integration-get-bundle-url
333 - shell: !include-raw: include-raw-integration-get-bundle-url.sh
335 # Macro: integration-get-bundle-url-root
336 # Operation: this macro gets the job generated distribution URL from root pom.xml
337 # Used by: distribution-verify-{stream} job template
340 name: integration-get-bundle-url-root
342 - shell: !include-raw: include-raw-integration-get-bundle-url-root.sh
344 # Macro: integration-install-robotframework
345 # Operation: Installs robotframework using pip to a virtualenv
346 # Used by: {project}-csit-* job templates
349 name: integration-install-robotframework
351 - shell: !include-raw: include-raw-integration-install-robotframework.sh
353 # Macro: integration-cleanup-tmp
354 # Operation: Cleans up temporary files created by build
355 # Used by: {project}-csit-* job templates
358 name: integration-cleanup-tmp
360 - shell: !include-raw: include-raw-integration-cleanup-tmp.sh
362 # Macro: integration-multipatch-builder
363 # Operation: checks out multiple patches and builds custom distribution
364 # Used by: integration-multipatch-test-* job templates
367 name: integration-multipatch-builder
369 - shell: !include-raw: include-raw-integration-multipatch-distribution-test.sh
371 # Macro: integration-cleanup-workspace
372 # Operation: Cleans up files possibly left there by the previous build
373 # Used by: {project}-csit-* job templates
376 name: integration-cleanup-workspace
378 - shell: !include-raw: include-raw-integration-cleanup-workspace.sh
380 # Macro: integration-rebase-patch
381 # Operation: For cloned project, rebase checked-out Gerrit patch onto $DISTROBRANCH.
382 # Used by: integration-patch-distribution-* job template
385 name: integration-rebase-gerrit-patch
387 - shell: !include-raw: include-raw-integration-rebase-gerrit-patch.sh
390 name: integration-deploy-openstack-run-test
392 - shell: !include-raw: include-raw-integration-deploy-openstack-run-test.sh
394 # Macro: integration-list-jobs
395 # Operation: queries Jenkins jobs from jenkins.opendaylight.org and
396 # writes a list of the jobs corresponding to the search terms to a file.
397 # Used by: builder-merge job template
399 # This script requires the following JJB variables to be passed in:
400 # {search_string} Job type to act as a primary filter (e.g. csit)
401 # {blacklist} List of sub-projects to filter out (e.g. longevity)
402 # {stream} Development release name (e.g. boron)
403 # {jobs-filename} Filename to write list into (e.g. carbon-jobs.lst)
404 # NOTE: Requires xmlstarlet installed on node.
407 name: integration-list-jobs
409 - shell: !include-raw: include-raw-integration-list-jobs.sh
411 # Macro: integration-replace-block-text
412 # Operation: using starting and ending regex to
413 # replace a block of text in a file with the text in
414 # another file. Regex should be basic and work with sed
415 # Used by: builder-merge job template
417 # This script requires the following JJB variables to be passed in:
420 # {file-with-changes-to-insert}
424 name: integration-replace-block-text
426 - shell: !include-raw: include-raw-integration-replace-block-text.sh
428 # Macro: integration-compare-distributions
429 # Operation: will compare an already created distribtion (probably last
430 # published to nexus) to the current distribution being created.
431 # The comparison is done to find the list of patches that are new to the
432 # current distribtion.
433 # Used by: builder-merge job template
435 # This script requires the bundle vars that are created by the
436 # get-bundle-vars macro script
440 name: integration-compare-distributions
442 - shell: !include-raw: include-raw-integration-compare-distributions.sh
448 # Macro: integration-robot
449 # Operation: this macro publishes robot results
450 # Used by: {project}-csit-* job templates
453 name: integration-robot
458 unstable-threshold: '{unstable-if}'
459 pass-threshold: '{pass-if}'
463 name: integration-robot-tempest
468 - tempest_results.html
469 unstable-threshold: '{unstable-if}'
470 pass-threshold: '{pass-if}'
474 name: integration-csit-archive-build
480 mkdir -p $WORKSPACE/archives
481 curl --output robot-plugin.zip "$BUILD_URL/robot/report/*zip*/robot-plugin.zip"
482 unzip -d $WORKSPACE/archives robot-plugin.zip
483 mv *log* *.log *.log.gz *.csv *.png $WORKSPACE/archives || true # Don't fail if file missing
484 script-only-if-succeeded: 'False'
485 script-only-if-failed: 'False'
486 mark-unstable-if-failed: 'True'