From a7f272ec385a44d8ed882d550baf24e714e6bee7 Mon Sep 17 00:00:00 2001 From: Nikita Fedkin Date: Tue, 5 Dec 2023 21:14:19 +0100 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=BE=20=D0=BF=D0=BE=D0=BB=D1=83=D1=87=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BF=D1=83=D1=82=D0=B5=D0=B9=20=D0=BA=20=D1=84?= =?UTF-8?q?=D0=B0=D0=B9=D0=BB=D0=B0=D0=BC=20=D0=BF=D1=80=D0=BE=D0=B5=D0=BA?= =?UTF-8?q?=D1=82=D0=B0=20edt.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit В случае когда ОС мастера и агента отличается --- .../steps/DesignerToEdtFormatTransformation.groovy | 8 +++++--- .../steps/EdtToDesignerFormatTransformation.groovy | 7 ++++--- src/ru/pulsar/jenkins/library/steps/EdtValidate.groovy | 4 +++- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/ru/pulsar/jenkins/library/steps/DesignerToEdtFormatTransformation.groovy b/src/ru/pulsar/jenkins/library/steps/DesignerToEdtFormatTransformation.groovy index 7ae969df..8ff00731 100644 --- a/src/ru/pulsar/jenkins/library/steps/DesignerToEdtFormatTransformation.groovy +++ b/src/ru/pulsar/jenkins/library/steps/DesignerToEdtFormatTransformation.groovy @@ -6,6 +6,7 @@ import ru.pulsar.jenkins.library.configuration.JobConfiguration import ru.pulsar.jenkins.library.ioc.ContextRegistry import ru.pulsar.jenkins.library.utils.Constants import ru.pulsar.jenkins.library.utils.EDT +import ru.pulsar.jenkins.library.utils.FileUtils import ru.pulsar.jenkins.library.utils.Logger class DesignerToEdtFormatTransformation implements Serializable { @@ -33,10 +34,11 @@ class DesignerToEdtFormatTransformation implements Serializable { def env = steps.env(); - def workspaceDir = "$env.WORKSPACE/$WORKSPACE" - def configurationRoot = new File(env.WORKSPACE, config.srcDir).getAbsolutePath() + def workspaceDir = FileUtils.getFilePath("$env.WORKSPACE/$WORKSPACE") + def srcDir = config.srcDir + def configurationRoot = FileUtils.getFilePath("$env.WORKSPACE/$srcDir") def edtVersionForRing = EDT.ringModule(config) - + steps.deleteDir(workspaceDir) Logger.println("Конвертация исходников из формата конфигуратора в формат EDT") diff --git a/src/ru/pulsar/jenkins/library/steps/EdtToDesignerFormatTransformation.groovy b/src/ru/pulsar/jenkins/library/steps/EdtToDesignerFormatTransformation.groovy index 65d67e8f..f80acf22 100644 --- a/src/ru/pulsar/jenkins/library/steps/EdtToDesignerFormatTransformation.groovy +++ b/src/ru/pulsar/jenkins/library/steps/EdtToDesignerFormatTransformation.groovy @@ -7,6 +7,7 @@ import ru.pulsar.jenkins.library.configuration.SourceFormat import ru.pulsar.jenkins.library.ioc.ContextRegistry import ru.pulsar.jenkins.library.utils.Constants import ru.pulsar.jenkins.library.utils.EDT +import ru.pulsar.jenkins.library.utils.FileUtils import ru.pulsar.jenkins.library.utils.Logger class EdtToDesignerFormatTransformation implements Serializable { @@ -35,9 +36,9 @@ class EdtToDesignerFormatTransformation implements Serializable { def env = steps.env(); def srcDir = config.srcDir - def projectDir = new File("$env.WORKSPACE/$srcDir").getCanonicalPath() - def workspaceDir = "$env.WORKSPACE/$WORKSPACE" - def configurationRoot = "$env.WORKSPACE/$CONFIGURATION_DIR" + def projectDir = FileUtils.getFilePath("$env.WORKSPACE/$srcDir") + def workspaceDir = FileUtils.getFilePath("$env.WORKSPACE/$WORKSPACE") + def configurationRoot = FileUtils.getFilePath("$env.WORKSPACE/$CONFIGURATION_DIR") def edtVersionForRing = EDT.ringModule(config) steps.deleteDir(workspaceDir) diff --git a/src/ru/pulsar/jenkins/library/steps/EdtValidate.groovy b/src/ru/pulsar/jenkins/library/steps/EdtValidate.groovy index 98c8f6d8..c24f812a 100644 --- a/src/ru/pulsar/jenkins/library/steps/EdtValidate.groovy +++ b/src/ru/pulsar/jenkins/library/steps/EdtValidate.groovy @@ -6,6 +6,7 @@ import ru.pulsar.jenkins.library.configuration.SourceFormat import ru.pulsar.jenkins.library.ioc.ContextRegistry import ru.pulsar.jenkins.library.utils.Constants import ru.pulsar.jenkins.library.utils.EDT +import ru.pulsar.jenkins.library.utils.FileUtils import ru.pulsar.jenkins.library.utils.Logger class EdtValidate implements Serializable { @@ -40,7 +41,8 @@ class EdtValidate implements Serializable { projectList = "--project-name-list $DesignerToEdtFormatTransformation.PROJECT_NAME" } else { - String projectDir = new File("$env.WORKSPACE/$config.srcDir").getCanonicalPath() + def srcDir = config.srcDir + def projectDir = FileUtils.getFilePath("$env.WORKSPACE/$srcDir") projectList = "--project-list \"$projectDir\"" }