2 # TODO: Make all bash constants more readable.
3 # e.g.: DISTRIBUTION_BRANCH instead of DISTROBRANCH.
5 name: integration-distribution-branch
10 description: 'Distribution GIT branch'
13 name: integration-bundleurl
17 default: '{bundleurl}'
18 description: 'URL to karaf distribution zip'
21 name: integration-jdk-version
25 default: '{jdkversion}'
26 description: 'Parameter to indicate JAVA Version'
29 name: integration-controller-scope
33 default: '{controller-scope}'
34 description: 'Feature Only or Feature All test'
37 name: integration-controller-features
40 name: CONTROLLERFEATURES
41 default: '{controller-features}'
42 description: 'Features to install in the controller separated by comma'
45 name: integration-distribution-stream
50 description: 'Distribution stream string, for suites to know which behavior to expect'
53 name: integration-stream-test-plan
57 default: '{stream-test-plan}'
58 description: 'Stream-specific test plan we will run'
61 name: integration-test-plan
65 default: '{test-plan}'
66 description: 'General test plan we will run unless stream-specific one is found'
69 name: integration-test-options
73 default: '{test-options}'
74 description: 'Robot command options'
77 name: integration-distribution-git-url
81 default: '{git-url}/integration/distribution'
82 description: 'Distribution GIT URL (do not modify)'
85 name: integration-patch-refspec
90 description: 'Integration Patch Refspec'
92 # Macro: integration-gerrit-scm
93 # Operation: this macro downloads a project gerrit
94 # Used by: all csit jobs
97 name: integration-gerrit-scm
100 credentials-id: 'opendaylight-jenkins-ssh'
107 choosing-strategy: 'gerrit'
109 # Macro: integration-distribution-scm
110 # Operation: this macro downloads the integration/distribution repo using distribution as basedir
111 # Used by: integration-patch-test-{stream} job template
114 name: integration-distribution-scm
117 credentials-id: 'opendaylight-jenkins-ssh'
118 basedir: 'distribution'
125 # Macro: integration-trigger-patch-submitted
126 # This is a single macro to use for all csit jobs who vote on every (relevant) patch set.
127 # Only 'recheck' trigger word is supported, it always triggers the full set of relevant jobs,
128 # in order to prevent Jenkins from starting only a subset and still voting Verified+1.
129 # Contrary to gerrit-trigger-patch-submitted, this votes +1 also on unstable runs.
131 # server: name of gerrit server to listen to
132 # project: pattern to match triggering projects
133 # branch: triggering branch name
134 # files: pattern to match triggering filepaths
136 name: integration-trigger-patch-submitted
139 server-name: '{server}'
141 - patchset-created-event:
143 exclude-trivial-rebase: false
144 exclude-no-code-change: false
145 - draft-published-event
146 - comment-added-contains-event:
147 comment-contains-value: recheck
149 gerrit-build-unstable-verified-value: +1
150 gerrit-build-unstable-codereview-value: 0
152 - project-compare-type: ANT
153 project-pattern: '{project}'
155 - branch-compare-type: ANT
156 branch-pattern: '**/{branch}'
161 # Macro: integration-openstack-controller-mininet
162 # Operation: this macro will spin the controller and mininet vms
163 # Used by: {project}-csit-* job templates
166 name: integration-openstack-controller-mininet
170 - cloud-name: 'ODLRPC'
171 template-name: '{controller-image}'
172 count: '{controller-vms}'
173 - cloud-name: 'ODLRPC'
174 template-name: '{mininet-image}'
175 count: '{mininet-vms}'
177 # Macro: integration-openstack-controller-devstack
178 # Operation: this macro will spin the controller and devstack vms
179 # Used by: {project}-csit-openstack job templates
181 name: integration-openstack-controller-devstack
185 - cloud-name: 'ODLRPC'
186 template-name: '{controller-image}'
187 count: '{controller-vms}'
188 - cloud-name: 'ODLRPC'
189 template-name: '{openstack-image}'
190 count: '{openstack-vms}'
196 # Macro: integration-infra-stack
197 # Operation: Sets environment and then calls opendaylight-infra-stack to spin
198 # up csit lab using openstack-heat.
199 # Used by: {project}-csit-* job templates
202 name: integration-infra-stack
204 - integration-cleanup-workspace
207 # Setup openstack envirnoment file for use by
208 # the opendaylight-infra-stack macro
209 cat > $WORKSPACE/opendaylight-infra-environment.yaml << EOF
211 vm_0_count: {vm_0_count}
212 vm_0_flavor: {vm_0_flavor}
213 vm_0_image: {vm_0_image}
214 vm_1_count: {vm_1_count}
215 vm_1_flavor: {vm_1_flavor}
216 vm_1_image: {vm_1_image}
218 echo "Contents of opendaylight-infra-environment.yaml ..."
219 cat $WORKSPACE/opendaylight-infra-environment.yaml
220 - opendaylight-infra-stack:
221 stack-template: '{stack-template}'
223 # Macro: integration-infra-stack-3-type
224 # Operation: Sets environment and then calls opendaylight-infra-stack to spin
225 # up csit lab using openstack-heat.
226 # Used by: {project}-csit-* job templates
229 name: integration-infra-stack-3-type
231 - integration-cleanup-workspace
234 # Setup openstack envirnoment file for use by
235 # the opendaylight-infra-stack macro
236 cat > $WORKSPACE/opendaylight-infra-environment.yaml << EOF
238 vm_0_count: {vm_0_count}
239 vm_0_flavor: {vm_0_flavor}
240 vm_0_image: {vm_0_image}
241 vm_1_count: {vm_1_count}
242 vm_1_flavor: {vm_1_flavor}
243 vm_1_image: {vm_1_image}
244 vm_2_count: {vm_2_count}
245 vm_2_flavor: {vm_2_flavor}
246 vm_2_image: {vm_2_image}
248 echo "Contents of opendaylight-infra-environment.yaml ..."
249 cat $WORKSPACE/opendaylight-infra-environment.yaml
250 - opendaylight-infra-stack:
251 stack-template: 'csit-3-instance-type.yaml'
253 # Macro: integration-get-slave-addresses
254 # Operation: this macro gets the IP addresses of the dynamic vms
255 # Used by: {project}-csit-* job templates
258 name: integration-get-slave-addresses
260 - shell: !include-raw: include-raw-integration-get-slave-addresses.sh
262 # Macro: integration-get-bundle-vars
263 # Operation: this macro gets all bundle related variables
264 # Used by: {project}-csit-3node-* job templates
267 name: integration-get-bundle-vars
269 - shell: !include-raw: include-raw-integration-get-bundle-vars.sh
271 # Macro: integration-distribution-check
272 # Operation: this macro deploys the controller with all fetures
273 # Used by: {project}-distribution-check-{stream} job template
276 name: integration-distribution-check
278 - shell: !include-raw: include-raw-integration-distribution-check.sh
280 # Macro: integration-deploy-controller-verify
281 # Operation: this macro deploys the controller with all fetures
282 # Used by: distribution-deploy-{stream} job template
285 name: integration-deploy-controller-verify
287 - shell: !include-raw: include-raw-integration-deploy-controller-verify.sh
289 # Macro: integration-deploy-controller-offline
290 # Operation: this macro deploys the controller with no external repo configuration
291 # Used by: integration-distrbution-offline-{stream} job template
294 name: integration-deploy-controller-offline
296 - shell: !include-raw: include-raw-integration-deploy-controller-offline.sh
298 # Macro: integration-deply-controller-run-test
299 # Operation: this macro deploys single contoller and runs test
300 # Used by: {project}-csit-1node-* job templates
303 name: integration-deploy-controller-run-test
305 - shell: !include-raw: include-raw-integration-deploy-controller-run-test.sh
307 # Macro: integration-configure-clustering
308 # Operation: this macro configures the clustering
309 # Used by: {project}-csit-3node-* job templates
312 name: integration-configure-clustering
314 - shell: !include-raw: include-raw-integration-configure-clustering.sh
316 # Macro: integration-start-cluster-run-test
317 # Operation: this macro starts the 3-node cluster and runs test
318 # Used by: {project}-csit-3node-* job templates
321 name: integration-start-cluster-run-test
323 - shell: !include-raw: include-raw-integration-start-cluster-run-test.sh
325 # Macro: integration-get-bundle-url
326 # Operation: this macro gets the job generated distribution URL from distribution pom.xml
327 # Used by: integration-patch-test-{stream} job template
330 name: integration-get-bundle-url
332 - shell: !include-raw: include-raw-integration-get-bundle-url.sh
334 # Macro: integration-get-bundle-url-root
335 # Operation: this macro gets the job generated distribution URL from root pom.xml
336 # Used by: distribution-verify-{stream} job template
339 name: integration-get-bundle-url-root
341 - shell: !include-raw: include-raw-integration-get-bundle-url-root.sh
343 # Macro: integration-install-robotframework
344 # Operation: Installs robotframework using pip to a virtualenv
345 # Used by: {project}-csit-* job templates
348 name: integration-install-robotframework
350 - shell: !include-raw: include-raw-integration-install-robotframework.sh
352 # Macro: integration-cleanup-tmp
353 # Operation: Cleans up temporary files created by build
354 # Used by: {project}-csit-* job templates
357 name: integration-cleanup-tmp
359 - shell: !include-raw: include-raw-integration-cleanup-tmp.sh
361 # Macro: integration-multipatch-builder
362 # Operation: checks out multiple patches and builds custom distribution
363 # Used by: integration-multipatch-test-* job templates
366 name: integration-multipatch-builder
368 - shell: !include-raw: include-raw-integration-multipatch-distribution-test.sh
370 # Macro: integration-cleanup-workspace
371 # Operation: Cleans up files possibly left there by the previous build
372 # Used by: {project}-csit-* job templates
375 name: integration-cleanup-workspace
377 - shell: !include-raw: include-raw-integration-cleanup-workspace.sh
379 # Macro: integration-rebase-patch
380 # Operation: For cloned project, rebase checked-out Gerrit patch onto $DISTROBRANCH.
381 # Used by: integration-patch-distribution-* job template
384 name: integration-rebase-gerrit-patch
386 - shell: !include-raw: include-raw-integration-rebase-gerrit-patch.sh
389 name: integration-deploy-openstack-run-test
391 - shell: !include-raw: include-raw-integration-deploy-openstack-run-test.sh
393 # Macro: integration-list-jobs
394 # Operation: queries Jenkins jobs from jenkins.opendaylight.org and
395 # writes a list of the jobs corresponding to the search terms to a file.
396 # Used by: builder-merge job template
398 # This script requires the following JJB variables to be passed in:
399 # {search_string} Job type to act as a primary filter (e.g. csit)
400 # {blacklist} List of sub-projects to filter out (e.g. longevity)
401 # {stream} Development release name (e.g. boron)
402 # {jobs-filename} Filename to write list into (e.g. carbon-jobs.lst)
403 # NOTE: Requires xmlstarlet installed on node.
406 name: integration-list-jobs
408 - shell: !include-raw: include-raw-integration-list-jobs.sh
410 # Macro: integration-replace-block-text
411 # Operation: using starting and ending regex to
412 # replace a block of text in a file with the text in
413 # another file. Regex should be basic and work with sed
414 # Used by: builder-merge job template
416 # This script requires the following JJB variables to be passed in:
419 # {file-with-changes-to-insert}
423 name: integration-replace-block-text
425 - shell: !include-raw: include-raw-integration-replace-block-text.sh
427 # Macro: integration-compare-distributions
428 # Operation: will compare an already created distribtion (probably last
429 # published to nexus) to the current distribution being created.
430 # The comparison is done to find the list of patches that are new to the
431 # current distribtion.
432 # Used by: builder-merge job template
434 # This script requires the bundle vars that are created by the
435 # get-bundle-vars macro script
439 name: integration-compare-distributions
441 - shell: !include-raw: include-raw-integration-compare-distributions.sh
447 # Macro: integration-robot
448 # Operation: this macro publishes robot results
449 # Used by: {project}-csit-* job templates
452 name: integration-robot
457 unstable-threshold: '{unstable-if}'
458 pass-threshold: '{pass-if}'
462 name: integration-robot-tempest
467 - tempest_results.html
468 unstable-threshold: '{unstable-if}'
469 pass-threshold: '{pass-if}'
473 name: integration-csit-archive-build
479 mkdir -p $WORKSPACE/archives
480 curl --output robot-plugin.zip "$BUILD_URL/robot/report/*zip*/robot-plugin.zip"
481 unzip -d $WORKSPACE/archives robot-plugin.zip
482 mv *log* *.log *.log.gz *.csv *.png $WORKSPACE/archives || true # Don't fail if file missing
483 script-only-if-succeeded: 'False'
484 script-only-if-failed: 'False'
485 mark-unstable-if-failed: 'True'