Integrate fetch-os-creds.sh to functest.yml 52/952/4
authorjose.lausuch <jose.lausuch@ericsson.com>
Thu, 2 Jul 2015 18:05:12 +0000 (20:05 +0200)
committerjose.lausuch <jose.lausuch@ericsson.com>
Thu, 2 Jul 2015 18:43:43 +0000 (20:43 +0200)
JIRA: FUNCTEST-7

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

index 1f284f0..0d77606 100644 (file)
@@ -3,11 +3,19 @@
 ###################################
 - project:
     name: functest
-
     pod:
-        - 'opnfv-jump-1'
-        - 'opnfv-jump-2'
-        - 'orange-build'
+        - opnfv-jump-1:
+            node: 'opnfv-jump-1'
+            installer_type: 'fuel'
+            installer_ip: '10.20.0.2'
+        - opnfv-jump-2:
+            node: 'opnfv-jump-2'
+            installer_type: 'foreman'
+            installer_ip: '172.30.10.73'
+        - orange-build:
+            node: 'orange-build'
+            installer_type: 'foreman'
+            installer_ip: '172.30.10.73'
     jobs:
         - 'functest-{pod}'
         - 'set-functest-env-{pod}'
 
             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 +78,7 @@
             # prepare
             echo "Functest: prepare Functest environment"
             python $WORKSPACE/testcases/config_functest.py --debug $WORKSPACE/ start
-            
+
 - job-template:
     name: clean-functest-env-{pod}
 
     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:
         artifactNumToKeep: -1
 
     builders:
+        - 'functest-fetch-os-creds'
         - 'functest-all'
         - 'functest-store-results'
         - 'functest-cleanup'
 
             # 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