From b44f4c67e3f5328e45fbd3aa4bb1bcbe3214e7e1 Mon Sep 17 00:00:00 2001 From: Dima Date: Thu, 12 Dec 2024 17:14:44 +0300 Subject: [PATCH] find dbgs through file --- .../jenkins/library/utils/CoverageUtils.groovy | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/ru/pulsar/jenkins/library/utils/CoverageUtils.groovy b/src/ru/pulsar/jenkins/library/utils/CoverageUtils.groovy index 5334c10..858ca58 100644 --- a/src/ru/pulsar/jenkins/library/utils/CoverageUtils.groovy +++ b/src/ru/pulsar/jenkins/library/utils/CoverageUtils.groovy @@ -84,12 +84,14 @@ class CoverageUtils { return dbgsPath.strip() } - def osResourcePath = steps.libraryResource "dbgs.os" - final osResultPath = "build/dbgs.os" - steps.writeFile(osResultPath, osResourcePath, 'UTF-8') + def dbgsFindScript = steps.libraryResource("dbgs.os") + final dbgsFindScriptPath = "build/dbgs.os" + final dbgsPathResult = "build/dbgsPath" + steps.writeFile(dbgsFindScriptPath, dbgsFindScript, 'UTF-8') - dbgsPath = steps.cmd("oscript ${osResultPath} ${config.v8version}", false, true) - dbgsPath = dbgsPath.strip() + steps.cmd("oscript ${dbgsFindScriptPath} ${config.v8version} > ${dbgsPathResult}", false, false) + + dbgsPath = steps.readFile(dbgsPathResult).strip() if (dbgsPath.isEmpty()) { steps.error("Не удалось найти путь к dbgs")