Add Functest execution after APEX deployment 79/3579/4
authorjose.lausuch <jose.lausuch@ericsson.com>
Tue, 24 Nov 2015 15:42:46 +0000 (16:42 +0100)
committerjose.lausuch <jose.lausuch@ericsson.com>
Wed, 25 Nov 2015 16:11:17 +0000 (17:11 +0100)
JIRA: FUNCTEST-69

Change-Id: I11ae219ac9090e59c992baa3835f428b3a614b19
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
jjb/apex/apex.yml
jjb/functest/functest.yml

index 376515b..dbc161e 100644 (file)
         - 'apex-upload-artifact'
         - 'apex-deploy-virtual'
         - 'apex-workspace-cleanup'
+        - trigger-builds:
+          - project: 'functest-apex-{stream}'
+            block: true
+            block-thresholds:
+                build-step-failure-threshold: 'never'
+                failure-threshold: 'never'
+                unstable-threshold: 'FAILURE'
 
 ########################
 # parameter macros
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