Skip to content

Commit

Permalink
Фикс
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanovEV committed Jan 19, 2024
1 parent 140407d commit f817a40
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 16 deletions.
2 changes: 2 additions & 0 deletions src/ru/pulsar/jenkins/library/steps/GetExtensions.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> logosConfig = ["LOGOS_CONFIG=$config.logosConfig"]
Expand Down
38 changes: 23 additions & 15 deletions src/ru/pulsar/jenkins/library/steps/LoadExtensions.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,34 @@ class LoadExtensions implements Serializable {

Logger.printLocation()

List<String> 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<String> logosConfig = ["LOGOS_CONFIG=$config.logosConfig"]
steps.withEnv(logosConfig) {
VRunner.exec(loadCommand)
}
}
}
2 changes: 1 addition & 1 deletion vars/pipeline1C.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit f817a40

Please sign in to comment.