X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Ffunctest%2Ffunctest.yml;h=bf824b6423690f5939a7ae5f2568056012f5bbbc;hb=1edf6d36019fcd644bb1efc665a0387e5c64c6a3;hp=b86155fe9209d361db7cd737e47c09cbe0df75e7;hpb=3f4517814e87c9fae77155fb01d1308ff5c6da3c;p=releng.git diff --git a/jjb/functest/functest.yml b/jjb/functest/functest.yml index b86155fe9..bf824b642 100644 --- a/jjb/functest/functest.yml +++ b/jjb/functest/functest.yml @@ -4,21 +4,35 @@ - project: name: functest + installer: + - fuel: + node: 'opnfv-jump-2' + installer_type: 'fuel' + installer_ip: '10.20.0.2' + - foreman: + node: 'opnfv-jump-2' + installer_type: 'foreman' + installer_ip: '172.30.10.73' pod: - - 'opnfv-jump-1' - - 'opnfv-jump-2' - - 'orange-build' + - orange-build: + node: 'orange-build' + installer_type: 'foreman' + installer_ip: '172.30.10.73' + jobs: - - 'functest-{pod}' - 'set-functest-env-{pod}' + - 'functest-{pod}' - 'clean-functest-env-{pod}' + - 'set-functest-env-{installer}-{stream}' + - 'functest-{installer}-{stream}' + - 'clean-functest-env-{installer}-{stream}' - 'functest-openstack-bench-test-{pod}' - 'functest-openstack-tempest-smoke-test-{pod}' - 'functest-odl-test-{pod}' - 'functest-vims-test-{pod}' - 'functest-vping-test-{pod}' - 'functest-daily-{stream}' - - 'functest-merge' + - 'functest-merge-{stream}' - 'functest-verify-{stream}' # stream: branch with - in place of / (eg. stable-arno) @@ -56,7 +70,12 @@ echo "Functest: prepare Functest environment" mkdir -p $HOME/functest/ - source $HOME/functest/opnfv-openrc.sh + # source openstack vars + if [[ ! -f $HOME/opnfv-openrc.sh ]]; then + echo "Unable to access file $HOME/opnfv-openrc.sh" + exit 1 + fi + source $HOME/opnfv-openrc.sh # WORKSPACE is the root of the functest repo # go into WORKSPACE where the functest repo is cloned @@ -65,7 +84,7 @@ # prepare echo "Functest: prepare Functest environment" python $WORKSPACE/testcases/config_functest.py --debug $WORKSPACE/ start - + - job-template: name: clean-functest-env-{pod} @@ -97,6 +116,72 @@ # cleanup python $WORKSPACE/testcases/config_functest.py --debug --force $WORKSPACE/ clean +- job-template: + name: set-functest-env-{installer}-{stream} + + project-type: freestyle + + node: '{node}' + + logrotate: + daysToKeep: 30 + numToKeep: 10 + artifactDaysToKeep: -1 + artifactNumToKeep: -1 + + builders: + - shell: | + #!/bin/bash + set +e + + echo "Functest: prepare Functest environment" + mkdir -p $HOME/functest/ + # source openstack vars + if [[ ! -f $HOME/opnfv-openrc.sh ]]; then + echo "Unable to access file $HOME/opnfv-openrc.sh" + exit 1 + fi + source $HOME/opnfv-openrc.sh + + # WORKSPACE is the root of the functest repo + # go into WORKSPACE where the functest repo is cloned + cd $WORKSPACE + + # prepare + echo "Functest: prepare Functest environment" + python $WORKSPACE/testcases/config_functest.py --debug $WORKSPACE/ start + +- job-template: + name: clean-functest-env-{installer}-{stream} + + project-type: freestyle + + node: '{node}' + + logrotate: + daysToKeep: 30 + numToKeep: 10 + artifactDaysToKeep: -1 + artifactNumToKeep: -1 + + builders: + - shell: | + #!/bin/bash + set +e + + # collect results + echo "Functest: copy results and clean Functest environment" + mkdir -p $HOME/functest/results + + # save ODL results + cp -Rf $WORSPACE/testcases/Controllers/ODL/CI/logs $HOME/functest/results/ODL + + # save tempest.conf for further troubleshooting + cp $HOME/.rally/tempest/for-deployment-*/tempest.conf $HOME/functest/results + + # cleanup + python $WORKSPACE/testcases/config_functest.py --debug --force $WORKSPACE/ clean + - job-template: name: functest-openstack-bench-test-{pod} @@ -212,6 +297,15 @@ parameters: - project-parameter: project: '{project}' + - string: + name: INSTALLER_TYPE + default: '{installer_type}' + description: "Installer name that is used for deployment." + - string: + name: INSTALLER_IP + default: '{installer_ip}' + description: "Installer IP." + - '{pod}' scm: - git-scm: @@ -226,6 +320,48 @@ artifactNumToKeep: -1 builders: + - 'functest-fetch-os-creds' + - 'functest-all' + - 'functest-store-results' + - 'functest-cleanup' + +- job-template: + name: functest-{installer}-{stream} + + project-type: freestyle + + node: '{node}' + + parameters: + - project-parameter: + project: '{project}' + - string: + name: INSTALLER_TYPE + default: '{installer_type}' + description: "Installer name that is used for deployment." + - string: + name: INSTALLER_IP + default: '{installer_ip}' + description: "Installer IP." + - string: + name: GIT_BASE + default: ssh://gerrit.opnfv.org:29418/$PROJECT + description: "Override GIT_BASE" + + scm: + - git-scm: + credentials-id: '{ssh-credentials}' + refspec: '' + branch: master + + logrotate: + daysToKeep: 30 + numToKeep: 10 + artifactDaysToKeep: -1 + artifactNumToKeep: -1 + + builders: + - 'functest-fetch-os-creds' - 'functest-all' - 'functest-store-results' - 'functest-cleanup' @@ -331,7 +467,7 @@ !include-raw ../opnfvdocs/docu-build.sh - job-template: - name: 'functest-merge' + name: 'functest-merge-{stream}' node: master @@ -351,7 +487,7 @@ - project-parameter: project: '{project}' - gerrit-parameter: - branch: 'master' + branch: '{branch}' scm: - gerrit-trigger-scm: @@ -374,7 +510,7 @@ project-pattern: 'functest' branches: - branch-compare-type: 'ANT' - branch-pattern: '**/master' + branch-pattern: '**/{branch}' builders: - shell: @@ -391,6 +527,29 @@ default: '{gs-pathname}' description: "Version directory where the opnfv documents will be stored in gs repository" +- parameter: + name: orange-build + parameters: + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: "Override GIT_BASE" + +- parameter: + name: opnfv-jump-1 + parameters: + - string: + name: GIT_BASE + default: ssh://gerrit.opnfv.org:29418/$PROJECT + description: "Override GIT_BASE" + +- parameter: + name: opnfv-jump-2 + parameters: + - string: + name: GIT_BASE + default: ssh://gerrit.opnfv.org:29418/$PROJECT + description: "Override GIT_BASE" ######################## # trigger macros ######################## @@ -404,6 +563,9 @@ triggers: - pollscm: "H 21 * * *" +######################## +# builder macros +######################## # macros - builder: name: functest-all @@ -466,3 +628,9 @@ # cleanup python $WORKSPACE/testcases/config_functest.py --debug --force $WORKSPACE/ clean + +- builder: + name: functest-fetch-os-creds + builders: + - shell: + !include-raw ../../utils/fetch_os_creds.sh