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:
commit
262cd7ac24
@ -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)
|
||||
|
@ -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) {
|
||||
|
@ -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")
|
||||
|
||||
|
@ -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 в формат Конфигуратора")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user