1 ###################################
2 # job configuration for functest
3 ###################################
10 installer_type: 'fuel'
11 installer_ip: '10.20.0.2'
14 installer_type: 'foreman'
15 installer_ip: '172.30.10.73'
19 installer_type: 'foreman'
20 installer_ip: '172.30.10.73'
23 - 'set-functest-env-{pod}'
25 - 'clean-functest-env-{pod}'
26 - 'set-functest-env-{installer}-{stream}'
27 - 'functest-{installer}-{stream}'
28 - 'clean-functest-env-{installer}-{stream}'
29 - 'functest-openstack-bench-test-{pod}'
30 - 'functest-openstack-tempest-smoke-test-{pod}'
31 - 'functest-odl-test-{pod}'
32 - 'functest-vims-{installer}-{stream}'
33 - 'functest-vping-test-{pod}'
34 - 'functest-daily-{stream}'
35 - 'functest-merge-{stream}'
36 - 'functest-verify-{stream}'
38 # stream: branch with - in place of / (eg. stable-arno)
39 # branch: branch (eg. stable/arno)
50 ################################
52 ################################
54 name: set-functest-env-{pod}
56 project-type: freestyle
63 artifactDaysToKeep: -1
71 echo "Functest: prepare Functest environment"
72 mkdir -p $HOME/functest/
73 # source openstack vars
74 if [[ ! -f $HOME/opnfv-openrc.sh ]]; then
75 echo "Unable to access file $HOME/opnfv-openrc.sh"
78 source $HOME/opnfv-openrc.sh
80 # WORKSPACE is the root of the functest repo
81 # go into WORKSPACE where the functest repo is cloned
85 echo "Functest: prepare Functest environment"
86 python $WORKSPACE/testcases/config_functest.py --debug $WORKSPACE/ start
89 name: clean-functest-env-{pod}
91 project-type: freestyle
98 artifactDaysToKeep: -1
107 echo "Functest: copy results and clean Functest environment"
108 mkdir -p $HOME/functest/results
111 cp -Rf $WORSPACE/testcases/Controllers/ODL/CI/logs $HOME/functest/results/ODL
113 # save tempest.conf for further troubleshooting
114 cp $HOME/.rally/tempest/for-deployment-*/tempest.conf $HOME/functest/results
117 # source openstack vars
118 source $HOME/opnfv-openrc.sh
119 python $WORKSPACE/testcases/config_functest.py --debug --force $WORKSPACE/ clean
122 name: set-functest-env-{installer}-{stream}
124 project-type: freestyle
131 artifactDaysToKeep: -1
132 artifactNumToKeep: -1
139 echo "Functest: prepare Functest environment"
140 mkdir -p $HOME/functest/
141 # source openstack vars
142 if [[ ! -f $HOME/opnfv-openrc.sh ]]; then
143 echo "Unable to access file $HOME/opnfv-openrc.sh"
146 source $HOME/opnfv-openrc.sh
148 # WORKSPACE is the root of the functest repo
149 # go into WORKSPACE where the functest repo is cloned
153 echo "Functest: prepare Functest environment"
154 python $WORKSPACE/testcases/config_functest.py --debug $WORKSPACE/ start
157 name: clean-functest-env-{installer}-{stream}
159 project-type: freestyle
166 artifactDaysToKeep: -1
167 artifactNumToKeep: -1
175 echo "Functest: copy results and clean Functest environment"
176 mkdir -p $HOME/functest/results
179 cp -Rf $WORSPACE/testcases/Controllers/ODL/CI/logs $HOME/functest/results/ODL
181 # save tempest.conf for further troubleshooting
182 cp $HOME/.rally/tempest/for-deployment-*/tempest.conf $HOME/functest/results
185 # source openstack vars
186 source $HOME/opnfv-openrc.sh
187 python $WORKSPACE/testcases/config_functest.py --debug --force $WORKSPACE/ clean
190 name: functest-openstack-bench-test-{pod}
192 project-type: freestyle
199 artifactDaysToKeep: -1
200 artifactNumToKeep: -1
207 echo "Functest: run Functest Rally Bench suites"
208 python $WORKSPACE/testcases/VIM/OpenStack/CI/libraries/run_rally.py --debug $WORKSPACE/ all
211 name: functest-openstack-tempest-smoke-test-{pod}
213 project-type: freestyle
220 artifactDaysToKeep: -1
221 artifactNumToKeep: -1
229 echo "Functest: run Tempest suite"
230 rally verify start smoke
234 name: functest-odl-test-{pod}
236 project-type: freestyle
243 artifactDaysToKeep: -1
244 artifactNumToKeep: -1
251 echo "Functest: run ODL suite"
252 $WORKSPACE/testcases/Controllers/ODL/CI/start_tests.sh
255 name: functest-vping-test-{pod}
257 project-type: freestyle
264 artifactDaysToKeep: -1
265 artifactNumToKeep: -1
273 echo "Functest: run vPing"
274 python $WORKSPACE/testcases/vPing/CI/libraries/vPing.py --debug $WORKSPACE/ -r
279 project-type: freestyle
288 default: '{installer_type}'
289 description: "Installer name that is used for deployment."
292 default: '{installer_ip}'
293 description: "Installer IP."
298 credentials-id: '{ssh-credentials}'
305 artifactDaysToKeep: -1
306 artifactNumToKeep: -1
309 - 'functest-fetch-os-creds'
311 - 'functest-store-results'
315 name: functest-{installer}-{stream}
317 project-type: freestyle
326 default: '{installer_type}'
327 description: "Installer name that is used for deployment."
330 default: '{installer_ip}'
331 description: "Installer IP."
334 default: ssh://gerrit.opnfv.org:29418/$PROJECT
335 description: "Override GIT_BASE"
339 credentials-id: '{ssh-credentials}'
346 artifactDaysToKeep: -1
347 artifactNumToKeep: -1
350 - 'functest-fetch-os-creds'
352 - 'functest-store-results'
356 name: functest-vims-{installer}-{stream}
358 project-type: freestyle
367 default: '{installer_type}'
368 description: "Installer name that is used for deployment."
371 default: '{installer_ip}'
372 description: "Installer IP."
375 default: ssh://gerrit.opnfv.org:29418/$PROJECT
376 description: "Override GIT_BASE"
380 credentials-id: '{ssh-credentials}'
387 artifactDaysToKeep: -1
388 artifactNumToKeep: -1
391 - 'functest-fetch-os-creds'
395 name: 'functest-daily-{stream}'
399 # Job template for daily builders
401 # Required Variables:
402 # stream: branch with - in place of / (eg. stable)
403 # branch: branch (eg. stable)
405 project-type: freestyle
406 varsetabove: '{somevar}'
409 daysToKeep: '{build-days-to-keep}'
410 numToKeep: '{build-num-to-keep}'
411 artifactDaysToKeep: '{build-artifact-days-to-keep}'
412 artifactNumToKeep: '{build-artifact-num-to-keep}'
417 - functest-parameter:
418 gs-pathname: '{gs-pathname}'
422 credentials-id: '{ssh-credentials}'
427 - ssh-agent-credentials:
428 user: '{ssh-credentials}'
431 - 'functest-{stream}'
438 !include-raw ../opnfvdocs/docu-build.sh
444 name: 'functest-verify-{stream}'
448 project-type: freestyle
453 artifactDaysToKeep: -1
454 artifactNumToKeep: -1
462 - gerrit-trigger-scm:
463 credentials-id: '{ssh-credentials}'
464 refspec: '$GERRIT_REFSPEC'
465 choosing-strategy: 'gerrit'
468 - ssh-agent-credentials:
469 user: '{ssh-credentials}'
474 - patchset-created-event:
475 exclude-drafts: 'false'
476 exclude-trivial-rebase: 'false'
477 exclude-no-code-change: 'false'
478 - draft-published-event
479 - comment-added-contains-event:
480 comment-contains-value: 'recheck'
481 - comment-added-contains-event:
482 comment-contains-value: 'reverify'
484 - project-compare-type: 'ANT'
485 project-pattern: 'functest'
487 - branch-compare-type: 'ANT'
488 branch-pattern: '**/{branch}'
492 !include-raw ../opnfvdocs/docu-build.sh
495 name: 'functest-merge-{stream}'
499 # builder-merge job to run JJB update
501 # This job's purpose is to update all the JJB
503 project-type: freestyle
508 artifactDaysToKeep: -1
518 - gerrit-trigger-scm:
519 credentials-id: '{ssh-credentials}'
521 choosing-strategy: 'default'
524 - ssh-agent-credentials:
525 user: '{ssh-credentials}'
530 - change-merged-event
531 - comment-added-contains-event:
532 comment-contains-value: 'remerge'
534 - project-compare-type: 'ANT'
535 project-pattern: 'functest'
537 - branch-compare-type: 'ANT'
538 branch-pattern: '**/{branch}'
542 !include-raw ../opnfvdocs/docu-build.sh
544 ########################
546 ########################
548 name: functest-parameter
552 default: '{gs-pathname}'
553 description: "Version directory where the opnfv documents will be stored in gs repository"
560 default: https://gerrit.opnfv.org/gerrit/$PROJECT
561 description: "Override GIT_BASE"
568 default: ssh://gerrit.opnfv.org:29418/$PROJECT
569 description: "Override GIT_BASE"
576 default: ssh://gerrit.opnfv.org:29418/$PROJECT
577 description: "Override GIT_BASE"
578 ########################
580 ########################
582 name: 'functest-master'
584 - pollscm: "H 9 * * *"
587 name: 'functest-stable-arno'
589 - pollscm: "H 21 * * *"
591 ########################
593 ########################
602 echo "Functest: prepare Functest environment"
603 mkdir -p $HOME/functest/
605 # source openstack vars
606 if [ ! -f $HOME/opnfv-openrc.sh ]; then
607 echo "Credentials file not found in "$HOME/opnfv-openrc.sh
610 echo "Sourcing the OpenStack credentials in"$HOME/opnfv-openrc.sh
611 source $HOME/opnfv-openrc.sh
613 # WORKSPACE is the root of the functest repo
614 # go into WORKSPACE where the functest repo is cloned
618 echo "Functest: prepare Functest environment"
619 python $WORKSPACE/testcases/config_functest.py --debug $WORKSPACE/ start
621 echo "Error when configuring Functest environment"
626 echo "Functest: run vPing"
627 python $WORKSPACE/testcases/vPing/CI/libraries/vPing.py --debug $WORKSPACE/ -r
630 echo "Functest: run ODL suite"
632 if [ $INSTALLER_TYPE == "fuel" ]; then
633 odl_ip=$(keystone catalog --service network | grep publicURL | cut -f3 -d"/" | cut -f1 -d":")
634 neutron_ip=$(keystone catalog --service identity | grep publicURL | cut -f3 -d"/" | cut -f1 -d":")
635 usr_name=$(env | grep OS | grep OS_USERNAME | cut -f2 -d'=')
636 pass=$(env | grep OS | grep OS_PASSWORD | cut -f2 -d'=')
638 ODL_PORT=$odl_port ODL_IP=$odl_ip NEUTRON_IP=$neutron_ip USR_NAME=$usr_name PASS=$pass \
639 $WORKSPACE/testcases/Controllers/ODL/CI/start_tests.sh
640 elif [ $INSTALLER_TYPE == "foreman" ]; then
642 $WORKSPACE/testcases/Controllers/ODL/CI/start_tests.sh
644 echo "INSTALLER_TYPE not valid."
649 echo "Functest: run Functest Rally Bench suites"
650 python $WORKSPACE/testcases/VIM/OpenStack/CI/libraries/run_rally.py --debug $WORKSPACE/ all
653 echo "Functest: run Tempest suite"
654 rally verify start smoke
658 echo "Functest: copy results and clean Functest environment"
659 mkdir -p $HOME/functest/results
662 cp -Rf $WORKSPACE/testcases/Controllers/ODL/CI/logs $HOME/functest/results/ODL
664 # save tempest.conf for further troubleshooting
665 cp $HOME/.rally/tempest/for-deployment-*/tempest.conf $HOME/functest/results
674 # source openstack vars
675 if [ ! -f $HOME/opnfv-openrc.sh ]; then
676 echo "Credentials file not found in "$HOME/opnfv-openrc.sh
679 echo "Sourcing the OpenStack credentials in"$HOME/opnfv-openrc.sh
680 source $HOME/opnfv-openrc.sh
682 # WORKSPACE is the root of the functest repo
683 # go into WORKSPACE where the functest repo is cloned
687 echo "Functest: run vIMS"
688 python $WORKSPACE/testcases/vIMS/CI/vIMS.py --debug $WORKSPACE/
692 name: functest-store-results
695 !include-raw res-build.sh
698 name: functest-cleanup
705 source $HOME/opnfv-openrc.sh
706 python $WORKSPACE/testcases/config_functest.py --debug --force $WORKSPACE/ clean
709 name: functest-fetch-os-creds
712 !include-raw ../../utils/fetch_os_creds.sh