1
0

Добавлен deleteDir() для типа FilePath

This commit is contained in:
Ivan Smirnov
2024-02-20 14:23:49 +03:00
parent 1a0b5cb15f
commit c2d9a20e9c
4 changed files with 14 additions and 3 deletions

View File

@@ -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<String> strings, Closure body)
def archiveArtifacts(String path)

View File

@@ -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<String> strings, Closure body) {
steps.withEnv(strings) {

View File

@@ -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")

View File

@@ -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 в формат Конфигуратора")