fixes to modular component install build file

Change-Id: Iec44c050a82ee01f409eaf38f5311ccdd2c3a390
diff --git a/Jenkinsfile-attworkflow-build b/Jenkinsfile-attworkflow-build
index 02fd814..b71ad9c 100644
--- a/Jenkinsfile-attworkflow-build
+++ b/Jenkinsfile-attworkflow-build
@@ -16,14 +16,13 @@
     timeout (100) {
         try {
             stage ("Parse deployment configuration file") {
-                sh returnStdout: true, script: "rm -rf ${configBaseDir}"
+                sh returnStdout: true, script: "rm -rf ${configBaseDir} helm-charts"
                 sh returnStdout: true, script: "git clone -b ${branch} ${cordRepoUrl}/${configBaseDir}"
                 deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}.yaml"
             }
             stage('Clean up') {
                 timeout(10) {
                     sh returnStdout: true, script: """
-                    rm -rf cord-tester
                     git clone -b ${branch} ${cordRepoUrl}/helm-charts
                     export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
                     for hchart in \$(helm list -q | grep -E -v 'docker-registry|mavenrepo|ponnet');
@@ -77,159 +76,161 @@
                     }
                 }
             }
-            stage('Install CORD Kafka') {
-                timeout(10) {
-                    sh returnStdout: true, script: """
-                    export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
-                    helm install -f examples/kafka-single.yaml --version 0.8.8 -n cord-kafka incubator/kafka
-                    """
-                }
-                timeout(10) {
-                    waitUntil {
-                        kafka_instances_running = sh returnStdout: true, script: """
-                        export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
-                        kubectl get pods | grep cord-kafka | grep -i running | grep 1/1 | wc -l
+            dir ("helm-charts") {
+                stage('Install CORD Kafka') {
+                    timeout(10) {
+                        sh returnStdout: true, script: """
+                        export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
+                        helm install -f examples/kafka-single.yaml --version 0.8.8 -n cord-kafka incubator/kafka
                         """
-                        return kafka_instances_running.toInteger() == 2
+                    }
+                    timeout(10) {
+                        waitUntil {
+                            kafka_instances_running = sh returnStdout: true, script: """
+                            export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
+                            kubectl get pods | grep cord-kafka | grep -i running | grep 1/1 | wc -l
+                            """
+                            return kafka_instances_running.toInteger() == 2
+                        }
                     }
                 }
-            }
-            stage('Install Logging Infrastructure') {
-                timeout(10) {
-                    sh returnStdout: true, script: """
-                    export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
-                    helm install -f examples/logging-single.yaml -n logging cord/logging
-                    scripts/wait_for_pods.sh
-                    """
-                }
-            }
-            stage('Install Monitoring Infrastructure') {
-                timeout(10) {
-                    sh returnStdout: true, script: """
-                    export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
-                    helm install -f ../${configBaseDir}/${configKubernetesDir}/${configFileName}.yml -n nem-monitoring cord/nem-monitoring
-                    scripts/wait_for_pods.sh
-                    """
-                }
-            }
-            stage('Install etcd-cluster') {
-                timeout(10) {
-                    sh returnStdout: true, script: """
-                    export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
-                    helm install -f ../${configBaseDir}/${configKubernetesDir}/${configFileName}.yml --version 0.8.0 -n etcd-operator stable/etcd-operator
-                    """
-                }
-                timeout(10) {
-                    waitUntil {
-                        etcd_running = sh returnStdout: true, script: """
-                        export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
-                        kubectl get pods | grep etcd | grep -i running | grep 1/1 | wc -l
+                stage('Install Logging Infrastructure') {
+                    timeout(10) {
+                        sh returnStdout: true, script: """
+                        export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
+                        helm install -f examples/logging-single.yaml -n logging cord/logging
+                        scripts/wait_for_pods.sh
                         """
-                        return etcd_running.toInteger() == 3
                     }
                 }
-            }
-            stage('Install voltha') {
-                timeout(10) {
-                    sh returnStdout: true, script: """
-                    export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
-                    helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/
-                    helm dep build voltha
-                    helm install -n voltha -f ../${configBaseDir}/${configKubernetesDir}/${configFileName}.yml cord/voltha
-                    """
-                }
-                timeout(10) {
-                    waitUntil {
-                        voltha_completed = sh returnStdout: true, script: """
-                        export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
-                        kubectl get pods -n voltha | grep -i running | grep 1/1 | wc -l
+                stage('Install Monitoring Infrastructure') {
+                    timeout(10) {
+                        sh returnStdout: true, script: """
+                        export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
+                        helm install -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml -n nem-monitoring cord/nem-monitoring
+                        scripts/wait_for_pods.sh
                         """
-                        return voltha_completed.toInteger() == 8
                     }
                 }
-            }
-            stage('Install ONOS') {
-                timeout(10) {
-                    sh returnStdout: true, script: """
-                    export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
-                    helm install -n onos -f ../${configBaseDir}/${configKubernetesDir}/${configFileName}.yml cord/onos
-                    """
-                }
-                timeout(10) {
-                    waitUntil {
-                        onos_completed = sh returnStdout: true, script: """
-                        export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
-                        kubectl get pods | grep -i onos | grep -i running | grep 2/2 | wc -l
+                stage('Install etcd-cluster') {
+                    timeout(10) {
+                        sh returnStdout: true, script: """
+                        export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
+                        helm install -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml --version 0.8.0 -n etcd-operator stable/etcd-operator
                         """
-                        return onos_completed.toInteger() == 1
+                    }
+                    timeout(10) {
+                        waitUntil {
+                            etcd_running = sh returnStdout: true, script: """
+                            export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
+                            kubectl get pods | grep etcd | grep -i running | grep 1/1 | wc -l
+                            """
+                            return etcd_running.toInteger() == 3
+                        }
                     }
                 }
-            }
-            stage('Install xos-core') {
-                timeout(10) {
-                    sh returnStdout: true, script: """
-                    export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
-                    helm install -f ../${configBaseDir}/${configKubernetesDir}/${configFileName}.yml -n xos-core cord/xos-core
-                    """
-                }
-                timeout(10) {
-                    waitUntil {
-                        xos_core_completed = sh returnStdout: true, script: """
-                        export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
-                        kubectl get pods | grep -i xos | grep -i running | grep 1/1 | wc -l
+                stage('Install voltha') {
+                    timeout(10) {
+                        sh returnStdout: true, script: """
+                        export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
+                        helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/
+                        helm dep build voltha
+                        helm install -n voltha -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml cord/voltha
                         """
-                        return xos_core_completed.toInteger() == 6
+                    }
+                    timeout(10) {
+                        waitUntil {
+                            voltha_completed = sh returnStdout: true, script: """
+                            export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
+                            kubectl get pods -n voltha | grep -i running | grep 1/1 | wc -l
+                            """
+                            return voltha_completed.toInteger() == 8
+                        }
                     }
                 }
-            }
-            stage('Install seba-services profile') {
-                timeout(10) {
-                    sh returnStdout: true, script: """
-                    export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
-                    helm install -f ../${configBaseDir}/${configKubernetesDir}/${configFileName}.yml -n seba-services cord/seba-services
-                    """
-                }
-                timeout(10) {
-                    waitUntil {
-                        att_workflow_tosca_completed = sh returnStdout: true, script: """
-                        export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
-                        kubectl get pods | grep -i seba-services-tosca-loader | grep -i completed | wc -l
+                stage('Install ONOS') {
+                    timeout(10) {
+                        sh returnStdout: true, script: """
+                        export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
+                        helm install -n onos -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml cord/onos
                         """
-                        return att_workflow_tosca_completed.toInteger() == 1
+                    }
+                    timeout(10) {
+                        waitUntil {
+                            onos_completed = sh returnStdout: true, script: """
+                            export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
+                            kubectl get pods | grep -i onos | grep -i running | grep 2/2 | wc -l
+                            """
+                            return onos_completed.toInteger() == 1
+                        }
                     }
                 }
-            }
-            stage('Install base-kubernetes') {
-                timeout(10) {
-                    sh returnStdout: true, script: """
-                    export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
-                    helm install -f ../${configBaseDir}/${configKubernetesDir}/${configFileName}.yml -n base-kubernetes cord/base-kubernetes
-                    """
-                }
-                timeout(10) {
-                    waitUntil {
-                        base_kubernetes_tosca_running = sh returnStdout: true, script: """
-                        export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
-                        kubectl get pods | grep -i base-kubernetes-tosca-loader | grep -i completed | wc -l
+                stage('Install xos-core') {
+                    timeout(10) {
+                        sh returnStdout: true, script: """
+                        export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
+                        helm install -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml -n xos-core cord/xos-core
                         """
-                        return base_kubernetes_tosca_running.toInteger() == 1
+                    }
+                    timeout(10) {
+                        waitUntil {
+                            xos_core_completed = sh returnStdout: true, script: """
+                            export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
+                            kubectl get pods | grep -i xos | grep -i running | grep 1/1 | wc -l
+                            """
+                            return xos_core_completed.toInteger() == 6
+                        }
                     }
                 }
-            }
-            stage('Install att workflow') {
-                timeout(10) {
-                    sh returnStdout: true, script: """
-                    export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
-                    helm install -f ../${configBaseDir}/${configKubernetesDir}/${configFileName}.yml --set att-workflow-driver.kafkaService=cord-kafka -n att-workflow cord/att-workflow
-                    """
-                }
-                timeout(10) {
-                    waitUntil {
-                        att_workflow_tosca_completed = sh returnStdout: true, script: """
-                        export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
-                        kubectl get pods | grep -i att-workflow-tosca-loader | grep -i completed | wc -l
+                stage('Install seba-services profile') {
+                    timeout(10) {
+                        sh returnStdout: true, script: """
+                        export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
+                        helm install -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml -n seba-services cord/seba-services
                         """
-                        return att_workflow_tosca_completed.toInteger() == 1
+                    }
+                    timeout(10) {
+                        waitUntil {
+                            att_workflow_tosca_completed = sh returnStdout: true, script: """
+                            export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
+                            kubectl get pods | grep -i seba-services-tosca-loader | grep -i completed | wc -l
+                            """
+                            return att_workflow_tosca_completed.toInteger() == 1
+                        }
+                    }
+                }
+                stage('Install base-kubernetes') {
+                    timeout(10) {
+                        sh returnStdout: true, script: """
+                        export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
+                        helm install -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml -n base-kubernetes cord/base-kubernetes
+                        """
+                    }
+                    timeout(10) {
+                        waitUntil {
+                            base_kubernetes_tosca_running = sh returnStdout: true, script: """
+                            export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
+                            kubectl get pods | grep -i base-kubernetes-tosca-loader | grep -i completed | wc -l
+                            """
+                            return base_kubernetes_tosca_running.toInteger() == 1
+                        }
+                    }
+                }
+                stage('Install att workflow') {
+                    timeout(10) {
+                        sh returnStdout: true, script: """
+                        export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
+                        helm install -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml --set att-workflow-driver.kafkaService=cord-kafka -n att-workflow cord/att-workflow
+                        """
+                    }
+                    timeout(10) {
+                        waitUntil {
+                            att_workflow_tosca_completed = sh returnStdout: true, script: """
+                            export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
+                            kubectl get pods | grep -i att-workflow-tosca-loader | grep -i completed | wc -l
+                            """
+                            return att_workflow_tosca_completed.toInteger() == 1
+                        }
                     }
                 }
             }
@@ -331,7 +332,7 @@
                         timeout(10) {
                             sh returnStdout: true, script: """
                             export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
-                            helm install -f ../${configBaseDir}/${configKubernetesDir}/${configFileName}.yml -n bbsim bbsim --set onus_per_pon_port=${onuNumber}
+                            helm install -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml -n bbsim bbsim --set onus_per_pon_port=${onuNumber}
                             """
                         }
                         timeout(10) {