diff --git a/src/ru/pulsar/jenkins/library/steps/GetExtensions.groovy b/src/ru/pulsar/jenkins/library/steps/GetExtensions.groovy index 6560c471..92abeae2 100644 --- a/src/ru/pulsar/jenkins/library/steps/GetExtensions.groovy +++ b/src/ru/pulsar/jenkins/library/steps/GetExtensions.groovy @@ -49,7 +49,9 @@ class GetExtensions implements Serializable { } private void buildExtension(Extension extension, String srcDir, String vrunnerPath, IStepExecutor steps) { + // ТУТ ГРЯЗНЫЙ ХАК VRunner.exec("mkdir -p $EXTENSIONS_OUT_DIR") + // ТУТ КОНЕЦ ГРЯЗНОГО ХАКА def compileExtCommand = "$vrunnerPath compileexttocfe --src ${srcDir} --out $EXTENSIONS_OUT_DIR/${extension.name}.cfe" List logosConfig = ["LOGOS_CONFIG=$config.logosConfig"] diff --git a/src/ru/pulsar/jenkins/library/steps/LoadExtensions.groovy b/src/ru/pulsar/jenkins/library/steps/LoadExtensions.groovy index 6b7e18a7..24b12c60 100644 --- a/src/ru/pulsar/jenkins/library/steps/LoadExtensions.groovy +++ b/src/ru/pulsar/jenkins/library/steps/LoadExtensions.groovy @@ -20,26 +20,34 @@ class LoadExtensions implements Serializable { Logger.printLocation() - List logosConfig = ["LOGOS_CONFIG=$config.logosConfig"] - steps.withEnv(logosConfig) { + def env = steps.env(); + cfeDir = "$env.WORKSPACE/$GetExtensions.EXTENSIONS_OUT_DIR" - String vrunnerPath = VRunner.getVRunnerPath(); + String vrunnerPath = VRunner.getVRunnerPath(); - config.initInfoBaseOptions.extensions.each { - Logger.println("Установим расширение ${it.name}") + config.initInfoBaseOptions.extensions.each { + Logger.println("Установим расширение ${it.name}") + loadExtension(it, vrunnerPath, steps, cfeDir) + } + } - // if (config.sourceFormat == SourceFormat.EDT) { - // def env = steps.env(); - // srcDir = "$env.WORKSPACE/$EdtToDesignerFormatTransformation.CONFIGURATION_DIR" + private void loadExtension (Extension extension, String vrunnerPath, IStepExecutor steps, String cfeDir) { - // steps.unstash(EdtToDesignerFormatTransformation.CONFIGURATION_ZIP_STASH) - // steps.unzip(srcDir, EdtToDesignerFormatTransformation.CONFIGURATION_ZIP) - // } else { - // srcDir = config.srcDir; - // } + String pathToExt = "$cfeDir/${extension.name}.cfe" + FilePath localPathToExt = FileUtils.getFilePath(pathToExt) - // VRunner.exec("$vrunnerPath ${it} --ibconnection \"/F./build/ib\"") - } + // Команда загрузки расширения + String loadCommand = vrunnerPath + ' run --command "Путь=' + localPathToExt + ';ЗавершитьРаботуСистемы;" --execute ' + String executeParameter = '$runnerRoot/epf/ЗагрузитьРасширениеВРежимеПредприятия.epf' + if (steps.isUnix()) { + executeParameter = '\\' + executeParameter + } + loadCommand += executeParameter + loadCommand += ' --ibconnection "/F./build/ib"' + + List logosConfig = ["LOGOS_CONFIG=$config.logosConfig"] + steps.withEnv(logosConfig) { + VRunner.exec(loadCommand) } } } diff --git a/vars/pipeline1C.groovy b/vars/pipeline1C.groovy index 5582e2d3..e7a62061 100644 --- a/vars/pipeline1C.groovy +++ b/vars/pipeline1C.groovy @@ -121,7 +121,7 @@ void call() { stage('Загрузка расширений в конфигурацию'){ steps { - timeout(time: config.timeoutOptions.loadExtintions, unit: TimeUnit.MINUTES) { + timeout(time: config.timeoutOptions.loadExtensions, unit: TimeUnit.MINUTES) { loadExtensions config } }