fixing bugs in build scripts

Change-Id: Ifc8b7dad56c5190c164202bcce7c263cd9bc4a0c
diff --git a/Jenkinsfile-attworkflow-build b/Jenkinsfile-attworkflow-build
index 6bdb2d6..35aeb39 100644
--- a/Jenkinsfile-attworkflow-build
+++ b/Jenkinsfile-attworkflow-build
@@ -234,34 +234,36 @@
                     }
                 }
             }
-            dir ("${configBaseDir}/${configToscaDir}/attworkflow-configs") {
-                stage('Configure R-CORD - Fabric and whitelist') {
-                    timeout(1) {
-                        waitUntil {
-                            out_fabric = sh returnStdout: true, script: """
-                            curl -s -H "xos-username: admin@opencord.org" -H "xos-password: letmein" -X POST --data-binary @${configFileName}-fabric.yaml http://${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
-                            """
-                            return out_fabric.toInteger() == 1
+            if ( params.configurePod ) {
+                dir ("${configBaseDir}/${configToscaDir}/attworkflow-configs") {
+                    stage('Configure R-CORD - Fabric and whitelist') {
+                        timeout(1) {
+                            waitUntil {
+                                out_fabric = sh returnStdout: true, script: """
+                                curl -s -H "xos-username:admin@opencord.org" -H "xos-password:letmein" -X POST --data-binary @${configFileName}-fabric.yaml http://${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
+                                """
+                                return out_fabric.toInteger() == 1
+                            }
                         }
                     }
-                }
-                stage('Configure R-CORD - Subscriber') {
-                    timeout(1) {
-                        waitUntil {
-                            out_subscriber = sh returnStdout: true, script: """
-                            curl -s -H 'xos-username: admin@opencord.org' -H 'xos-password: letmein' -X POST --data-binary @${configFileName}-subscriber.yaml http://${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
-                            """
-                            return out_subscriber.toInteger() == 1
+                    stage('Configure R-CORD - Subscriber') {
+                        timeout(1) {
+                            waitUntil {
+                                out_subscriber = sh returnStdout: true, script: """
+                                curl -s -H 'xos-username:admin@opencord.org' -H 'xos-password:letmein' -X POST --data-binary @${configFileName}-subscriber.yaml http://${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
+                                """
+                                return out_subscriber.toInteger() == 1
+                            }
                         }
                     }
-                }
-                stage('Configure R-CORD - OLT') {
-                    timeout(1) {
-                        waitUntil {
-                            out_olt = sh returnStdout: true, script: """
-                            curl -H 'xos-username: admin@opencord.org' -H 'xos-password: letmein' -X POST --data-binary @${configFileName}-olt.yaml http://${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
-                            """
-                            return out_olt.toInteger() == 1
+                    stage('Configure R-CORD - OLT') {
+                        timeout(1) {
+                            waitUntil {
+                                out_olt = sh returnStdout: true, script: """
+                                curl -H 'xos-username:admin@opencord.org' -H 'xos-password:letmein' -X POST --data-binary @${configFileName}-olt.yaml http://${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
+                                """
+                                return out_olt.toInteger() == 1
+                            }
                         }
                     }
                 }
diff --git a/Jenkinsfile-rcordlite-topdown-build b/Jenkinsfile-rcordlite-topdown-build
index 40e4c2d..89e97b7 100644
--- a/Jenkinsfile-rcordlite-topdown-build
+++ b/Jenkinsfile-rcordlite-topdown-build
@@ -199,13 +199,13 @@
                     }
                 }
             }
-            if ( configurePod ) {
-                dir ("${configBaseDir}/${configToscaDir}/${profile}-${scenario}") {
+            if ( params.configurePod ) {
+                dir ("${configBaseDir}/${configToscaDir}/${profile}") {
                     stage('Configure R-CORD - Fabric and whitelist') {
                         timeout(1) {
                             waitUntil {
                             out_fabric = sh returnStdout: true, script: """
-                            curl -s -H "xos-username: admin@opencord.org" -H "xos-password: letmein" -X POST --data-binary @${configFileName}-fabric.yaml http: //${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
+                            curl -s -H "xos-username:admin@opencord.org" -H "xos-password: letmein" -X POST --data-binary @${configFileName}-fabric.yaml http://${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
                             """
                             return out_fabric.toInteger() == 1
                             }
@@ -215,7 +215,7 @@
                         timeout(1) {
                             waitUntil {
                             out_subscriber = sh returnStdout: true, script: """
-                            curl -s -H 'xos-username: admin@opencord.org' -H 'xos-password: letmein' -X POST --data-binary @${configFileName}-subscriber.yaml http: //${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
+                            curl -s -H 'xos-username:admin@opencord.org' -H 'xos-password:letmein' -X POST --data-binary @${configFileName}-subscriber.yaml http://${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
                             """
                             return out_subscriber.toInteger() == 1
                             }
@@ -225,7 +225,7 @@
                         timeout(1) {
                             waitUntil {
                             out_olt = sh returnStdout: true, script: """
-                            curl -H 'xos-username: admin@opencord.org' -H 'xos-password: letmein' -X POST --data-binary @${configFileName}-olt.yaml http: //${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
+                            curl -H 'xos-username:admin@opencord.org' -H 'xos-password:letmein' -X POST --data-binary @${configFileName}-olt.yaml http://${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
                             """
                             return out_olt.toInteger() == 1
                             }
diff --git a/Jenkinsfile-rcordlite-zerotouch-build b/Jenkinsfile-rcordlite-zerotouch-build
index c0680ab..da6fb3d 100644
--- a/Jenkinsfile-rcordlite-zerotouch-build
+++ b/Jenkinsfile-rcordlite-zerotouch-build
@@ -233,13 +233,13 @@
                     }
                 }
             }
-            if ( configurePod ) {
-                dir ("${configBaseDir}/${configToscaDir}/${profile}-${scenario}") {
+            if ( params.configurePod ) {
+                dir ("${configBaseDir}/${configToscaDir}/${profile}") {
                     stage('Configure R-CORD - Fabric and whitelist') {
                         timeout(1) {
                             waitUntil {
                             out_fabric = sh returnStdout: true, script: """
-                            curl -s -H "xos-username: admin@opencord.org" -H "xos-password: letmein" -X POST --data-binary @${configFileName}-fabric.yaml http: //${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
+                            curl -s -H "xos-username:admin@opencord.org" -H "xos-password:letmein" -X POST --data-binary @${configFileName}-fabric.yaml http://${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
                             """
                             return out_fabric.toInteger() == 1
                             }
@@ -249,7 +249,7 @@
                         timeout(1) {
                             waitUntil {
                             out_subscriber = sh returnStdout: true, script: """
-                            curl -s -H 'xos-username: admin@opencord.org' -H 'xos-password: letmein' -X POST --data-binary @${configFileName}-subscriber.yaml http: //${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
+                            curl -s -H 'xos-username:admin@opencord.org' -H 'xos-password:letmein' -X POST --data-binary @${configFileName}-subscriber.yaml http://${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
                             """
                             return out_subscriber.toInteger() == 1
                             }
@@ -259,7 +259,7 @@
                         timeout(1) {
                             waitUntil {
                             out_olt = sh returnStdout: true, script: """
-                            curl -H 'xos-username: admin@opencord.org' -H 'xos-password: letmein' -X POST --data-binary @${configFileName}-olt.yaml http: //${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
+                            curl -H 'xos-username:admin@opencord.org' -H 'xos-password:letmein' -X POST --data-binary @${configFileName}-olt.yaml http://${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
                             """
                             return out_olt.toInteger() == 1
                             }