Skip to content

Commit

Permalink
Фикс
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanovEV committed Jan 18, 2024
1 parent 73f41bc commit 927c7ab
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/ru/pulsar/jenkins/library/steps/GetExtensions.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ class GetExtensions implements Serializable {

def run() {
IStepExecutor steps = ContextRegistry.getContext().getStepExecutor()
def env = steps.env();

Logger.printLocation()

steps.installLocalDependencies();


String vrunnerPath = initVRunnerPath();
String srcDir = getSrcDir();
String srcDir = getSrcDir(env);

Logger.println("Сборка расширений")

Expand All @@ -39,7 +41,7 @@ class GetExtensions implements Serializable {
buildExtension(it, srcDir, vrunnerPath)
} else {
Logger.println("Загрузка расширения ${it.name} из интернета по ссылке ${it.path}")
loadExtension(it)
loadExtension(it, env)
}
}
}
Expand All @@ -55,7 +57,7 @@ class GetExtensions implements Serializable {
}
}

private void loadExtension(Extension extension) {
private void loadExtension(Extension extension, def env) {
String pathToExtension = "$env.WORKSPACE/${EXTENSIONS_OUT_DIR}/${extension.name}.cfe"
FilePath localPathToExtension = FileUtils.getFilePath(pathToExtension)
localPathToExtension.copyFrom(new URL(extension.path))
Expand All @@ -66,10 +68,8 @@ class GetExtensions implements Serializable {
return VRunner.getVRunnerPath()
}

private String getSrcDir() {
private String getSrcDir(def env) {
if (config.sourceFormat == SourceFormat.EDT) {
def env = steps.env();

sourceDirName = "$env.WORKSPACE/$EdtToDesignerFormatTransformation.EXTENSION_DIR"
// распакуем расширения
steps.unstash(EdtToDesignerFormatTransformation.EXTENSION_ZIP_STASH)
Expand Down

0 comments on commit 927c7ab

Please sign in to comment.