VOL-5155 - triage failure in periodic-voltha-test-bbsim-2.12
vars/pgrep_proc.groovy
vars/pkill_proc.groovy
jjb/pipeline/voltha/voltha-2.12/bbsim-tests.groovy
--------------------------------------------------
o Re-home pgrep_proc and pkill_proc inlined code blocks
into standalone vars/ scripts.
o Cleanup npm-groovy-warnings.
o Add banners in {pgrep,pkill} to help diagnose the silent
exception reported during job runs yesterday.
Change-Id: I73644b748139612b32ce2dd56e5a97c04eb5cac0
diff --git a/vars/pkill_proc.groovy b/vars/pkill_proc.groovy
index 54d58ad..753a1f1 100644
--- a/vars/pkill_proc.groovy
+++ b/vars/pkill_proc.groovy
@@ -36,7 +36,13 @@
String cmdKill = "pkill --echo '${proc}'"
String cmd = """if [[ \$(pgrep --count "${proc}") -gt 0 ]]; then ${cmdKill}; fi"""
- println(" ** Running: ${cmd}")
+
+ print("""
+** -----------------------------------------------------------------------
+** Running: $cmd
+** -----------------------------------------------------------------------
+""")
+
sh(
label : 'pkill_proc', // jenkins usability: label log entry 'step'
script : "${cmd}",