1
0
mirror of https://github.com/firstBitMarksistskaya/jenkins-lib.git synced 2025-08-25 20:09:25 +02:00

fix lambda

This commit is contained in:
Dima
2024-12-13 16:00:14 +03:00
parent 5327243e9f
commit 1376330906

View File

@@ -10,8 +10,6 @@ class CoverageCleanup implements Serializable {
private final JobConfiguration config
private final String stageName
private String encoding = 'UTF-8'
CoverageCleanup(JobConfiguration config, String stageName = "") {
this.config = config
this.stageName = stageName
@@ -39,9 +37,14 @@ class CoverageCleanup implements Serializable {
if (steps.isUnix()) {
command = "kill $pids"
} else {
def pidsForCmd = pids.split(" ")
.each { it -> "/PID $it" }
.join(" ")
def pidsForCmd = ''
def pidsArray = pids.split(" ")
pidsArray.each {
pidsForCmd += "/PID $it"
}
pidsForCmd = pidsForCmd.trim()
command = "taskkill $pidsForCmd /F"
}
steps.cmd(command, true, false)