1
0
mirror of https://github.com/firstBitMarksistskaya/jenkins-lib.git synced 2025-01-22 12:12:53 +02:00

Merge pull request #111 from ivanmolodec/develop

Добавлен deleteDir() для типа FilePath
This commit is contained in:
Nikita Fedkin 2024-02-20 18:40:20 +01:00 committed by GitHub
commit 262cd7ac24
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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 в формат Конфигуратора")