diff --git a/src/ru/pulsar/jenkins/library/IStepExecutor.groovy b/src/ru/pulsar/jenkins/library/IStepExecutor.groovy index beb43207..4e15fe6f 100644 --- a/src/ru/pulsar/jenkins/library/IStepExecutor.groovy +++ b/src/ru/pulsar/jenkins/library/IStepExecutor.groovy @@ -1,5 +1,6 @@ package ru.pulsar.jenkins.library +import hudson.FilePath import jenkins.plugins.http_request.HttpMode import jenkins.plugins.http_request.MimeType import jenkins.plugins.http_request.ResponseContentSupplier @@ -53,6 +54,8 @@ interface IStepExecutor { void deleteDir(String path) + void deleteDir(FilePath path) + def withEnv(List strings, Closure body) def archiveArtifacts(String path) diff --git a/src/ru/pulsar/jenkins/library/StepExecutor.groovy b/src/ru/pulsar/jenkins/library/StepExecutor.groovy index b58b4943..59030cfa 100644 --- a/src/ru/pulsar/jenkins/library/StepExecutor.groovy +++ b/src/ru/pulsar/jenkins/library/StepExecutor.groovy @@ -1,5 +1,6 @@ package ru.pulsar.jenkins.library +import hudson.FilePath import jenkins.plugins.http_request.HttpMode import jenkins.plugins.http_request.MimeType import jenkins.plugins.http_request.ResponseContentSupplier @@ -119,6 +120,13 @@ class StepExecutor implements IStepExecutor { } } + @Override + void deleteDir(FilePath path) { + steps.dir(path.getRemote()) { + steps.deleteDir() + } + } + @Override def withEnv(List strings, Closure body) { steps.withEnv(strings) { diff --git a/src/ru/pulsar/jenkins/library/steps/DesignerToEdtFormatTransformation.groovy b/src/ru/pulsar/jenkins/library/steps/DesignerToEdtFormatTransformation.groovy index 1f32ecaf..8ff00731 100644 --- a/src/ru/pulsar/jenkins/library/steps/DesignerToEdtFormatTransformation.groovy +++ b/src/ru/pulsar/jenkins/library/steps/DesignerToEdtFormatTransformation.groovy @@ -39,7 +39,7 @@ class DesignerToEdtFormatTransformation implements Serializable { def configurationRoot = FileUtils.getFilePath("$env.WORKSPACE/$srcDir") def edtVersionForRing = EDT.ringModule(config) - steps.deleteDir(workspaceDir.getRemote()) + 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 498f4ff0..f80acf22 100644 --- a/src/ru/pulsar/jenkins/library/steps/EdtToDesignerFormatTransformation.groovy +++ b/src/ru/pulsar/jenkins/library/steps/EdtToDesignerFormatTransformation.groovy @@ -41,8 +41,8 @@ class EdtToDesignerFormatTransformation implements Serializable { def configurationRoot = FileUtils.getFilePath("$env.WORKSPACE/$CONFIGURATION_DIR") def edtVersionForRing = EDT.ringModule(config) - steps.deleteDir(workspaceDir.getRemote()) - steps.deleteDir(configurationRoot.getRemote()) + steps.deleteDir(workspaceDir) + steps.deleteDir(configurationRoot) Logger.println("Конвертация исходников из формата EDT в формат Конфигуратора")