Add Functest execution after APEX deployment
[releng.git] / jjb / functest / functest.yml
index cb72fc7..fe6c898 100644 (file)
@@ -9,18 +9,19 @@
             node: 'opnfv-jump-2'
             installer_type: 'fuel'
             installer_ip: '10.20.0.2'
-            functest_repo_dir:  '/home/opnfv/repos/functest'
         - foreman:
             node: 'opnfv-jump-2'
             installer_type: 'foreman'
             installer_ip: '172.30.10.73'
-            functest_repo_dir:  '/home/opnfv/repos/functest'
+        - apex:
+            node: 'opnfv-jump-1'
+            installer_type: 'apex'
+            installer_ip: '192.168.X.X'
     pod:
         - orange-build:
             node: 'orange-build'
             installer_type: 'foreman'
             installer_ip: '172.30.10.73'
-            functest_repo_dir:  '/home/opnfv/repos/functest'
 
     jobs:
         - 'set-functest-env-{pod}'
     parameters:
         - project-parameter:
             project: '{project}'
+        - functest-parameter
         - string:
             name: INSTALLER_TYPE
             default: '{installer_type}'
             name: INSTALLER_IP
             default: '{installer_ip}'
             description: "Installer IP."
-        - string:
-            name: FUNCTEST_REPO_DIR
-            default: '{functest_repo_dir}'
-            description: "Directory where the root functest repo is cloned in the docker."
         - '{pod}'
 
     scm:
     parameters:
         - project-parameter:
             project: '{project}'
+        - functest-parameter
         - string:
             name: INSTALLER_TYPE
             default: '{installer_type}'
             name: INSTALLER_IP
             default: '{installer_ip}'
             description: "Installer IP."
-        - string:
-            name: FUNCTEST_REPO_DIR
-            default: '{functest_repo_dir}'
-            description: "Directory where the root functest repo is cloned in the docker."
         - string:
             name: GIT_BASE
             default: ssh://gerrit.opnfv.org:29418/$PROJECT
     parameters:
         - project-parameter:
             project: '{project}'
+        - functest-parameter
         - string:
             name: INSTALLER_TYPE
             default: '{installer_type}'
             name: INSTALLER_IP
             default: '{installer_ip}'
             description: "Installer IP."
-        - string:
-            name: FUNCTEST_REPO_DIR
-            default: '{functest_repo_dir}'
-            description: "Directory where the root functest repo is cloned in the docker."
         - string:
             name: GIT_BASE
             default: ssh://gerrit.opnfv.org:29418/$PROJECT
             name: GS_PATHNAME
             default: '{gs-pathname}'
             description: "Version directory where the opnfv documents will be stored in gs repository"
+        - string:
+            name: FUNCTEST_REPO_DIR
+            default: "/home/opnfv/repos/functest"
+            description: "Directory where the Functest repository is cloned"
 
 - parameter:
     name: orange-build
         - shell: |
             #!/bin/bash
             set +e
-
+            if [[ ${INSTALLER_TYPE} == 'apex' ]]; then
+                INSTALLER_IP=$(cat instack /var/lib/libvirt/dnsmasq/default.leases \
+                    |sed 's/.*192/192/g' | sed 's/\ in.*//g')
+            fi
             echo "Functest: Start Docker and prepare environment"
             envs="INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP}"
             docker pull opnfv/functest:latest_stable