Skip to content

Commit

Permalink
fix pids
Browse files Browse the repository at this point in the history
  • Loading branch information
ovcharenko-di committed Sep 2, 2024
1 parent ef32674 commit d5a2ba2
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/ru/pulsar/jenkins/library/steps/CoverageCleanup.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,18 @@ class CoverageCleanup implements Serializable {

Logger.printLocation()

String dbgsPIDS = env.YAXUNIT_DBGS_PIDS
String coverage41CPIDS = env.YAXUNIT_COVERAGE41C_PIDS
def env = steps.env();
String dbgsPIDS = env.YAXUNIT_DBGS_PIDS // space-delimited string
String coverage41CPIDS = env.YAXUNIT_COVERAGE41C_PIDS // space-delimited string

def combined = dbgsPIDS + " " + coverage41CPIDS
def combined = (dbgsPIDS + " " + coverage41CPIDS).trim()

if (combined.isEmpty()) {
return
}

if (steps.isUnix()) {
def command = "pkill $combined"
def command = "kill $combined"
steps.sh(command, true, false, encoding)
} else {
def winCommand = combined.split(" ")
Expand Down

0 comments on commit d5a2ba2

Please sign in to comment.