Adding bash -c to avoid jenkins killing the port forwarding when the pipeline is completed
Change-Id: Ic2a6ec658bd0293e2b974c83e33dbb2fd1bd0d8a
diff --git a/Jenkinsfile-voltha-bal31-build b/Jenkinsfile-voltha-bal31-build
index d634028..f181ce1 100644
--- a/Jenkinsfile-voltha-bal31-build
+++ b/Jenkinsfile-voltha-bal31-build
@@ -92,9 +92,7 @@
export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
#This uses the default route out, porperly configured is the management
mgmt_address=`ip route get 1 | awk '{print \$NF;exit}'`
- while true; do
- kubectl port-forward -n default service/onos-openflow --address=\$mgmt_address 6653:6653;
- done & > /dev/null 2>&1
+ bash -c "while true; do kubectl port-forward -n default service/onos-openflow --address=\$mgmt_address 6653:6653; done" >> /dev/null 2>&1 &
"""
}
}