Add project parameter to jobs set to run on LF PODs
[releng.git] / jjb / functest / functest.yml
index c4dfe4e..6bba3cc 100644 (file)
 
     node: '{pod}'
 
+    parameters:
+        - project-parameter:
+            project: '{project}'
+
+    scm:
+        - git-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: ''
+            branch: master
+
     logrotate:
         daysToKeep: 30
         numToKeep: 10
     name: functest-all
     builders:
         - shell: |
-            echo "Functest: run Functest suites"
-            python $HOME/.functest/run_rally.py all
-            python $HOME/.functest/run_rally.py smoke
-            python $HOME/.functest/vPing/vPing.py
-            $HOME/.functest/ODL/start_tests.sh
+            echo "Functest: prepare Functest environment"
+            mkdir -p $HOME/functest/
+            source $HOME/functest/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
+
+            # tempest
+            echo "Functest: run Tempest suite"
+            rally verify start smoke
+            rally verify list
+
+            # vPing
+            echo "Functest: run vPing"
+            python $WORKSPACE/testcases/vPing/CI/libraries/vPing.py --debug $WORKSPACE/
+
+            # rally
+            echo "Functest: run Functest Rally Bench suites"
+            python $WORKSPACE/testcases/VIM/OpenStack/CI/libraries/run_rally.py --debug $WORKSPACE/ all
+
+            # ODL
+            echo "Functest: run ODL suite"
+            $WORKSPACE/testcases/Controllers/ODL/CI/start_tests.sh
+
+            # collect results
+            echo "Functest: copy results and clean Functest environment"
+            mkdir -p $HOME/functest/results
+
+            # save tempest.conf for further troubleshooting
+            cp $HOME/.rally/for-deployment-*/tempest.conf $HOME/functest/results
+
+            # cleanup
+            python $WORKSPACE/testcases/config_functest.py --debug --force $WORKSPACE/ clean