[VOL-2906] Adding capability to push custom tech profile on GPON OLT. Minimal DT sadis cfg adjustment
Change-Id: I1d70d21d27f77453800c638bf95da2726f96d202
diff --git a/Jenkinsfile-voltha-build b/Jenkinsfile-voltha-build
index 5198c70..ccc0831 100644
--- a/Jenkinsfile-voltha-build
+++ b/Jenkinsfile-voltha-build
@@ -17,6 +17,10 @@
if (params.withKind != null){
withKind = params.withKind
}
+ def tech_prof_directory = "XGS_PON"
+ if (params.oltDebVersion.contains("asgvolt64")){
+ tech_prof_directory = "GPON"
+ }
timeout (100) {
try {
stage ("Parse deployment configuration file") {
@@ -128,14 +132,14 @@
export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
etcd_container=\$(kubectl get pods -n voltha | grep voltha-etcd-cluster | awk 'NR==1{print \$1}')
kubectl cp $WORKSPACE/voltha-system-tests/tests/data/TechProfile-${profile}.json voltha/\$etcd_container:/tmp/flexpod.json
- put_result=\$(kubectl exec -it \$etcd_container -n voltha -- /bin/sh -c 'cat /tmp/flexpod.json | ETCDCTL_API=3 etcdctl put service/voltha/technology_profiles/XGS-PON/64')
+ put_result=\$(kubectl exec -it \$etcd_container -n voltha -- /bin/sh -c 'cat /tmp/flexpod.json | ETCDCTL_API=3 etcdctl put service/voltha/technology_profiles/${tech_prof_directory}/64')
"""
return out_push_tp == 0
}
timeout(1) {
out_get_tp = sh returnStatus: true, script: """
etcd_container=\$(kubectl get pods -n voltha | grep voltha-etcd-cluster | awk 'NR==1{print \$1}')
- get_result=\$(kubectl exec -it \$etcd_container -n voltha -- /bin/sh -c 'ETCDCTL_API=3 etcdctl get --prefix service/voltha/technology_profiles/XGS-PON/64')
+ get_result=\$(kubectl exec -it \$etcd_container -n voltha -- /bin/sh -c 'ETCDCTL_API=3 etcdctl get --prefix service/voltha/technology_profiles/${tech_prof_directory}/64')
"""
return out_get_tp == 0
}