1
0
mirror of https://github.com/firstBitMarksistskaya/jenkins-lib.git synced 2024-12-11 11:19:08 +02:00

замена . на WORKSPACE

This commit is contained in:
ivanovEV 2024-03-14 19:41:30 +03:00
parent 0f758ce950
commit 9316311dff

View File

@ -48,7 +48,7 @@ class GetExtensions implements Serializable {
String srcDir = getSrcDir(it, sourceDirName) String srcDir = getSrcDir(it, sourceDirName)
buildExtension(it, srcDir, vrunnerPath, steps) buildExtension(it, srcDir, vrunnerPath, steps)
} else if (it.initMethod == InitExtensionMethod.FILE){ } else if (it.initMethod == InitExtensionMethod.FILE){
Logger.println("Загрузка расширения ${it.name} из интернета по ссылке ${it.path}") Logger.println("Загрузка расширения ${it.name} из ${it.path}")
loadExtension(it, env) loadExtension(it, env)
} else { } else {
Logger.println("Неизвестный метод инициализации расширения ${it.name}") Logger.println("Неизвестный метод инициализации расширения ${it.name}")
@ -77,7 +77,8 @@ class GetExtensions implements Serializable {
localPathToExtension.copyFrom(new URL(extension.path)) localPathToExtension.copyFrom(new URL(extension.path))
} else { } else {
// If the path is a local file, copy the file // If the path is a local file, copy the file
FilePath localFilePath = FileUtils.getFilePath(extension.path) String localPath = extension.path.startsWith(".") ? "$env.WORKSPACE/${extension.path.substring(1)}" : extension.path
FilePath localFilePath = FileUtils.getFilePath(localPath)
localPathToExtension.copyFrom(localFilePath.toURI().toURL()) localPathToExtension.copyFrom(localFilePath.toURI().toURL())
} }
} }