Merge "Avoid failure in case no port-forwards are present. Without || true the result will be ps aux grep port-forw grep -v grep awk '{print $2}' xargs --no-run-if-empty kill -9 kill: (15338): No such process"
diff --git a/jjb/pipeline/voltha-scale-multi-stack.groovy b/jjb/pipeline/voltha-scale-multi-stack.groovy
index b10224d..8264387 100644
--- a/jjb/pipeline/voltha-scale-multi-stack.groovy
+++ b/jjb/pipeline/voltha-scale-multi-stack.groovy
@@ -103,7 +103,7 @@
rm -rf $WORKSPACE/*
# remove orphaned port-forward from different namespaces
- ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9
+ ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9 || true
"""
}
}
diff --git a/jjb/pipeline/voltha/master/bbsim-tests.groovy b/jjb/pipeline/voltha/master/bbsim-tests.groovy
index 7a6fd92..a67d32a 100644
--- a/jjb/pipeline/voltha/master/bbsim-tests.groovy
+++ b/jjb/pipeline/voltha/master/bbsim-tests.groovy
@@ -98,7 +98,7 @@
// remove port-forwarding
sh """
# remove orphaned port-forward from different namespaces
- ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9
+ ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9 || true
"""
// collect pod details
getPodsInfo("$WORKSPACE/${name}")
diff --git a/jjb/pipeline/voltha/master/periodic-bbsim-tests.groovy b/jjb/pipeline/voltha/master/periodic-bbsim-tests.groovy
index 777737a..d05a406 100755
--- a/jjb/pipeline/voltha/master/periodic-bbsim-tests.groovy
+++ b/jjb/pipeline/voltha/master/periodic-bbsim-tests.groovy
@@ -36,7 +36,7 @@
timeout(1) {
sh returnStdout: false, script: '''
# remove orphaned port-forward from different namespaces
- ps aux | grep port-forw | grep -v grep | awk '{print $2}' | xargs --no-run-if-empty kill -9
+ ps aux | grep port-forw | grep -v grep | awk '{print $2}' | xargs --no-run-if-empty kill -9 || true
'''
}
}
diff --git a/jjb/pipeline/voltha/master/physical-build.groovy b/jjb/pipeline/voltha/master/physical-build.groovy
index 87cd9d4..05a059e 100644
--- a/jjb/pipeline/voltha/master/physical-build.groovy
+++ b/jjb/pipeline/voltha/master/physical-build.groovy
@@ -76,7 +76,7 @@
timeout(1) {
sh returnStdout: false, script: '''
# remove orphaned port-forward from different namespaces
- ps aux | grep port-forw | grep -v grep | awk '{print $2}' | xargs --no-run-if-empty kill -9
+ ps aux | grep port-forw | grep -v grep | awk '{print $2}' | xargs --no-run-if-empty kill -9 || true
'''
}
}
diff --git a/jjb/pipeline/voltha/master/software-upgrades.groovy b/jjb/pipeline/voltha/master/software-upgrades.groovy
index 86443a3..aca2d7f 100644
--- a/jjb/pipeline/voltha/master/software-upgrades.groovy
+++ b/jjb/pipeline/voltha/master/software-upgrades.groovy
@@ -134,7 +134,7 @@
// remove port-forwarding
sh """
# remove orphaned port-forward from different namespaces
- ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9
+ ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9 || true
"""
// collect pod details
get_pods_info("$WORKSPACE/${name}")
@@ -185,7 +185,7 @@
// remove port-forwarding
sh """
# remove orphaned port-forward from different namespaces
- ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9
+ ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9 || true
"""
helmTeardown(['infra', 'voltha'])
}
diff --git a/jjb/pipeline/voltha/master/tucson-build-and-test.groovy b/jjb/pipeline/voltha/master/tucson-build-and-test.groovy
index f2070fe..e6e1bbd 100644
--- a/jjb/pipeline/voltha/master/tucson-build-and-test.groovy
+++ b/jjb/pipeline/voltha/master/tucson-build-and-test.groovy
@@ -74,7 +74,7 @@
timeout(1) {
sh returnStdout: false, script: '''
# remove orphaned port-forward from different namespaces
- ps aux | grep port-forw | grep -v grep | awk '{print $2}' | xargs --no-run-if-empty kill -9
+ ps aux | grep port-forw | grep -v grep | awk '{print $2}' | xargs --no-run-if-empty kill -9 || true
'''
}
}
diff --git a/jjb/pipeline/voltha/master/voltha-scale-multi-stack.groovy b/jjb/pipeline/voltha/master/voltha-scale-multi-stack.groovy
index 4536656..fb5e75c 100644
--- a/jjb/pipeline/voltha/master/voltha-scale-multi-stack.groovy
+++ b/jjb/pipeline/voltha/master/voltha-scale-multi-stack.groovy
@@ -55,7 +55,7 @@
timeout(time: 11, unit: 'MINUTES') {
sh """
# remove orphaned port-forward from different namespaces
- ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9
+ ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9 || true
"""
script {
def namespaces = ["infra"]
@@ -71,7 +71,7 @@
helm repo update
# remove all port-forward from different namespaces
- ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9
+ ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9 || true
"""
}
}
@@ -347,7 +347,7 @@
printf '%s\n' \$(voltctl -m 8MB logicaldevice list -q) | xargs --no-run-if-empty -I# bash -c "voltctl -m 8MB logicaldevice port list # > $LOG_FOLDER/${stack_ns}/voltha-logicaldevice-ports-#.txt" || true
# remove VOLTHA port-forward
- ps aux | grep port-forw | grep voltha-api | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9
+ ps aux | grep port-forw | grep voltha-api | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9 || true
"""
} catch(e) {
sh '''
@@ -455,7 +455,7 @@
"""
sh """
# remove VOLTHA port-forward
- ps aux | grep port-forw | grep voltha-api | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9 2>&1 > /dev/null
+ ps aux | grep port-forw | grep voltha-api | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9 2>&1 > /dev/null || true
"""
}
}
diff --git a/jjb/pipeline/voltha/master/voltha-scale-test.groovy b/jjb/pipeline/voltha/master/voltha-scale-test.groovy
index e0b65d3..35604f8 100644
--- a/jjb/pipeline/voltha/master/voltha-scale-test.groovy
+++ b/jjb/pipeline/voltha/master/voltha-scale-test.groovy
@@ -69,7 +69,7 @@
helm repo update
# remove orphaned port-forward from different namespaces
- ps aux | grep port-forw | grep -v grep | awk '{print $2}' | xargs --no-run-if-empty kill -9
+ ps aux | grep port-forw | grep -v grep | awk '{print $2}' | xargs --no-run-if-empty kill -9 || true
cd $WORKSPACE
rm -rf $WORKSPACE/*
diff --git a/jjb/pipeline/voltha/voltha-2.7/bbsim-tests.groovy b/jjb/pipeline/voltha/voltha-2.7/bbsim-tests.groovy
index 41720cd..c72c0f9 100644
--- a/jjb/pipeline/voltha/voltha-2.7/bbsim-tests.groovy
+++ b/jjb/pipeline/voltha/voltha-2.7/bbsim-tests.groovy
@@ -129,7 +129,7 @@
// remove port-forwarding
sh """
# remove orphaned port-forward from different namespaces
- ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9
+ ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9 || true
"""
// collect pod details
get_pods_info("$WORKSPACE/${name}")
diff --git a/jjb/pipeline/voltha/voltha-2.7/software-upgrades.groovy b/jjb/pipeline/voltha/voltha-2.7/software-upgrades.groovy
index 124e05b..7bdf278 100644
--- a/jjb/pipeline/voltha/voltha-2.7/software-upgrades.groovy
+++ b/jjb/pipeline/voltha/voltha-2.7/software-upgrades.groovy
@@ -130,7 +130,7 @@
// remove port-forwarding
sh """
# remove orphaned port-forward from different namespaces
- ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9
+ ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9 || true
"""
// collect pod details
get_pods_info("$WORKSPACE/${name}")
@@ -181,7 +181,7 @@
// remove port-forwarding
sh """
# remove orphaned port-forward from different namespaces
- ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9
+ ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9 || true
"""
helmTeardown(['infra', 'voltha'])
}
diff --git a/jjb/pipeline/voltha/voltha-2.7/voltha-scale-test.groovy b/jjb/pipeline/voltha/voltha-2.7/voltha-scale-test.groovy
index d88b180..11bb1c4 100644
--- a/jjb/pipeline/voltha/voltha-2.7/voltha-scale-test.groovy
+++ b/jjb/pipeline/voltha/voltha-2.7/voltha-scale-test.groovy
@@ -79,7 +79,7 @@
done
# remove orphaned port-forward from different namespaces
- ps aux | grep port-forw | grep -v grep | awk '{print $2}' | xargs --no-run-if-empty kill -9
+ ps aux | grep port-forw | grep -v grep | awk '{print $2}' | xargs --no-run-if-empty kill -9 || true
cd $WORKSPACE
rm -rf $WORKSPACE/*