Add project parameter to jobs set to run on LF PODs
[releng.git] / jjb / functest / functest.yml
index b3d1ce8..6bba3cc 100644 (file)
@@ -1,7 +1,11 @@
 - project:
     name: functest
 
+    pod:
+        - 'opnfv-jump-1'
+        - 'opnfv-jump-2'
     jobs:
+        - 'functest-{pod}'
         - 'functest-openstack-bench-test'
         - 'functest-openstack-tempest-smoke-test'
         - 'functest-odl-test'
@@ -35,7 +39,7 @@
 
     builders:
         - shell: |
-            python .functest/run_rally.py all
+            python $HOME/.functest/run_rally.py all
 
 - job-template:
     name: functest-openstack-tempest-smoke-test
@@ -54,7 +58,6 @@
         - shell: |
             rally verify start smoke
             rally verify list
-            
 
 - job-template:
     name: functest-odl-test
@@ -95,7 +98,7 @@
     name: functest-vping-test
 
     project-type: freestyle
-    
+
     node: opnfv-jump-2
 
     logrotate:
 
     builders:
         - shell: |
-            python ./.functest/vPing/vPing.py
+            python $HOME/.functest/vPing/vPing.py
+
+- job-template:
+    name: functest-{pod}
+
+    project-type: freestyle
 
+    node: '{pod}'
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+
+    scm:
+        - git-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: ''
+            branch: master
+
+    logrotate:
+        daysToKeep: 30
+        numToKeep: 10
+        artifactDaysToKeep: -1
+        artifactNumToKeep: -1
 
+    builders:
+        - 'functest-all'
 
 - job-template:
     name: 'functest-daily-{stream}'
         - shell:
             !include-raw docu-build.sh
 
+# macros
+- builder:
+    name: functest-all
+    builders:
+        - shell: |
+            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