Adding BBSim to the build
Change-Id: Iddd1004caa10563bd4f52215e2e0e535ad40f25e
diff --git a/Jenkinsfile-attworkflow-build b/Jenkinsfile-attworkflow-build
index 5bfb2a5..4658813 100644
--- a/Jenkinsfile-attworkflow-build
+++ b/Jenkinsfile-attworkflow-build
@@ -296,6 +296,39 @@
}
}
}
+ if ( params.installBBSim ) {
+ dir ("helm-charts") {
+ stage('Install BBSim') {
+ 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}
+ """
+ }
+ timeout(10) {
+ waitUntil {
+ base_kubernetes_tosca_running = sh returnStdout: true, script: """
+ export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
+ kubectl get pods -n voltha | grep -i bbsim | wc -l
+ """
+ return base_kubernetes_tosca_running.toInteger() == 1
+ }
+ }
+ }
+ }
+ dir ("${configBaseDir}/${configToscaDir}/bbsim") {
+ stage('Configure BBSim - 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 @bbsim-16.yaml http://${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
+ """
+ return out_olt.toInteger() == 1
+ }
+ }
+ }
+ }
+ }
currentBuild.result = 'SUCCESS'
} catch (err) {
currentBuild.result = 'FAILURE'