Merge "Updated reinstall OLT software stage in physical-build pipeline for oltDebVersion"
diff --git a/jjb/pipeline/voltha/master/physical-build.groovy b/jjb/pipeline/voltha/master/physical-build.groovy
index ee49e55..079ba91 100644
--- a/jjb/pipeline/voltha/master/physical-build.groovy
+++ b/jjb/pipeline/voltha/master/physical-build.groovy
@@ -282,24 +282,11 @@
for(int i=0; i < deployment_config.olts.size(); i++) {
// NOTE what is oltDebVersion23? is that for VOLTHA-2.3? do we still need this differentiation?
sh returnStdout: true, script: """
- if [[ "${branch}" != "master" ]] && [[ "${params.inBandManagement}" == "true" ]]; then
- ssh-keyscan -H ${deployment_config.olts[i].sship} >> ~/.ssh/known_hosts
+ ssh-keyscan -H ${deployment_config.olts[i].sship} >> ~/.ssh/known_hosts
+ if [ "${params.inBandManagement}" == "true" ]; then
sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} 'kill -9 `pgrep -f "[b]ash /opt/openolt/openolt_dev_mgmt_daemon_process_watchdog"` || true'
- sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} "dpkg --install ${deployment_config.olts[i].oltDebVersion23}"
fi
- if [[ "${branch}" != "master" ]] && [[ "${params.inBandManagement}" == "false" ]]; then
- ssh-keyscan -H ${deployment_config.olts[i].sship} >> ~/.ssh/known_hosts
- sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} "dpkg --install ${deployment_config.olts[i].oltDebVersion23}"
- fi
- if [[ "${branch}" == "master" ]] && [[ "${params.inBandManagement}" == "true" ]]; then
- ssh-keyscan -H ${deployment_config.olts[i].sship} >> ~/.ssh/known_hosts
- sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} 'kill -9 `pgrep -f "[b]ash /opt/openolt/openolt_dev_mgmt_daemon_process_watchdog"` || true'
- sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} "dpkg --install ${deployment_config.olts[i].oltDebVersion}"
- fi
- if [[ "${branch}" == "master" ]] && [[ "${params.inBandManagement}" == "false" ]]; then
- ssh-keyscan -H ${deployment_config.olts[i].sship} >> ~/.ssh/known_hosts
- sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} "dpkg --install ${deployment_config.olts[i].oltDebVersion}"
- fi
+ sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} "dpkg --install ${deployment_config.olts[i].oltDebVersion}"
sleep 10
"""
timeout(5) {
diff --git a/jjb/pipeline/voltha/voltha-2.8/physical-build.groovy b/jjb/pipeline/voltha/voltha-2.8/physical-build.groovy
index f26fd4a..3dbd97a 100644
--- a/jjb/pipeline/voltha/voltha-2.8/physical-build.groovy
+++ b/jjb/pipeline/voltha/voltha-2.8/physical-build.groovy
@@ -283,24 +283,11 @@
for(int i=0; i < deployment_config.olts.size(); i++) {
// NOTE what is oltDebVersion23? is that for VOLTHA-2.3? do we still need this differentiation?
sh returnStdout: true, script: """
- if [[ "${branch}" != "master" ]] && [[ "${params.inBandManagement}" == "true" ]]; then
- ssh-keyscan -H ${deployment_config.olts[i].sship} >> ~/.ssh/known_hosts
+ ssh-keyscan -H ${deployment_config.olts[i].sship} >> ~/.ssh/known_hosts
+ if [ "${params.inBandManagement}" == "true" ]; then
sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} 'kill -9 `pgrep -f "[b]ash /opt/openolt/openolt_dev_mgmt_daemon_process_watchdog"` || true'
- sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} "dpkg --install ${deployment_config.olts[i].oltDebVersion23}"
fi
- if [[ "${branch}" != "master" ]] && [[ "${params.inBandManagement}" == "false" ]]; then
- ssh-keyscan -H ${deployment_config.olts[i].sship} >> ~/.ssh/known_hosts
- sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} "dpkg --install ${deployment_config.olts[i].oltDebVersion23}"
- fi
- if [[ "${branch}" == "master" ]] && [[ "${params.inBandManagement}" == "true" ]]; then
- ssh-keyscan -H ${deployment_config.olts[i].sship} >> ~/.ssh/known_hosts
- sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} 'kill -9 `pgrep -f "[b]ash /opt/openolt/openolt_dev_mgmt_daemon_process_watchdog"` || true'
- sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} "dpkg --install ${deployment_config.olts[i].oltDebVersion}"
- fi
- if [[ "${branch}" == "master" ]] && [[ "${params.inBandManagement}" == "false" ]]; then
- ssh-keyscan -H ${deployment_config.olts[i].sship} >> ~/.ssh/known_hosts
- sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} "dpkg --install ${deployment_config.olts[i].oltDebVersion}"
- fi
+ sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} "dpkg --install ${deployment_config.olts[i].oltDebVersion}"
sleep 10
"""
timeout(5) {