You've already forked jenkins-lib
forked from jenkins/jenkins-lib
Передача флага --nocacheuse для VRunner
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -5,3 +5,6 @@ bin/
|
|||||||
lib/
|
lib/
|
||||||
|
|
||||||
*.iml
|
*.iml
|
||||||
|
.classpath
|
||||||
|
.project
|
||||||
|
.settings/
|
||||||
|
@@ -34,7 +34,7 @@ class Bdd implements Serializable {
|
|||||||
config.bddOptions.vrunnerSteps.each {
|
config.bddOptions.vrunnerSteps.each {
|
||||||
Logger.println("Шаг запуска сценариев командой ${it}")
|
Logger.println("Шаг запуска сценариев командой ${it}")
|
||||||
String vrunnerPath = VRunner.getVRunnerPath();
|
String vrunnerPath = VRunner.getVRunnerPath();
|
||||||
steps.cmd("$vrunnerPath ${it} --ibconnection \"/F./build/ib\"")
|
VRunner.exec("$vrunnerPath ${it} --ibconnection \"/F./build/ib\"")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -44,6 +44,6 @@ class InitFromFiles implements Serializable {
|
|||||||
Logger.println("Выполнение загрузки конфигурации из файлов")
|
Logger.println("Выполнение загрузки конфигурации из файлов")
|
||||||
String vrunnerPath = VRunner.getVRunnerPath();
|
String vrunnerPath = VRunner.getVRunnerPath();
|
||||||
def initCommand = "$vrunnerPath init-dev --src $srcDir --ibconnection \"/F./build/ib\""
|
def initCommand = "$vrunnerPath init-dev --src $srcDir --ibconnection \"/F./build/ib\""
|
||||||
steps.cmd(initCommand)
|
VRunner.exec(initCommand)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -57,7 +57,7 @@ class InitFromStorage implements Serializable {
|
|||||||
)
|
)
|
||||||
]) {
|
]) {
|
||||||
String vrunnerPath = VRunner.getVRunnerPath()
|
String vrunnerPath = VRunner.getVRunnerPath()
|
||||||
steps.cmd "$vrunnerPath init-dev --storage $storageVersionParameter --ibconnection \"/F./build/ib\""
|
VRunner.exec "$vrunnerPath init-dev --storage $storageVersionParameter --ibconnection \"/F./build/ib\""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -37,7 +37,7 @@ class InitInfobase implements Serializable {
|
|||||||
|
|
||||||
// Запуск миграции
|
// Запуск миграции
|
||||||
steps.catchError {
|
steps.catchError {
|
||||||
steps.cmd(vrunnerPath + ' run --command "ЗапуститьОбновлениеИнформационнойБазы;ЗавершитьРаботуСистемы;" --execute \\$runnerRoot/epf/ЗакрытьПредприятие.epf --ibconnection "/F./build/ib"')
|
VRunner.exec(vrunnerPath + ' run --command "ЗапуститьОбновлениеИнформационнойБазы;ЗавершитьРаботуСистемы;" --execute \\$runnerRoot/epf/ЗакрытьПредприятие.epf --ibconnection "/F./build/ib"')
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Logger.println("Шаг миграции ИБ выключен")
|
Logger.println("Шаг миграции ИБ выключен")
|
||||||
@@ -49,12 +49,12 @@ class InitInfobase implements Serializable {
|
|||||||
files = files.sort new OrderBy( { it.name })
|
files = files.sort new OrderBy( { it.name })
|
||||||
files.each {
|
files.each {
|
||||||
Logger.println("Первичная инициализация файлом ${it.path}")
|
Logger.println("Первичная инициализация файлом ${it.path}")
|
||||||
steps.cmd("$vrunnerPath vanessa --settings ${it.path} --ibconnection \"/F./build/ib\"")
|
VRunner.exec("$vrunnerPath vanessa --settings ${it.path} --ibconnection \"/F./build/ib\"")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
config.initInfobaseOptions.additionalInitializationSteps.each {
|
config.initInfobaseOptions.additionalInitializationSteps.each {
|
||||||
Logger.println("Первичная инициализация командой ${it}")
|
Logger.println("Первичная инициализация командой ${it}")
|
||||||
steps.cmd("$vrunnerPath ${it} --ibconnection \"/F./build/ib\"")
|
VRunner.exec("$vrunnerPath ${it} --ibconnection \"/F./build/ib\"")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -5,6 +5,8 @@ import ru.pulsar.jenkins.library.ioc.ContextRegistry
|
|||||||
|
|
||||||
class VRunner {
|
class VRunner {
|
||||||
|
|
||||||
|
static final String DEFAULT_VRUNNER_OPTS = "RUNNER_NOCACHEUSE=1"
|
||||||
|
|
||||||
static String getVRunnerPath() {
|
static String getVRunnerPath() {
|
||||||
|
|
||||||
IStepExecutor steps = ContextRegistry.getContext().getStepExecutor()
|
IStepExecutor steps = ContextRegistry.getContext().getStepExecutor()
|
||||||
@@ -17,4 +19,12 @@ class VRunner {
|
|||||||
|
|
||||||
return vrunnerPath;
|
return vrunnerPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int exec(String command, boolean returnStatus = false) {
|
||||||
|
IStepExecutor steps = ContextRegistry.getContext().getStepExecutor()
|
||||||
|
|
||||||
|
steps.withEnv([DEFAULT_VRUNNER_OPTS]) {
|
||||||
|
return steps.cmd(command, returnStatus)
|
||||||
|
} as int
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -56,7 +56,7 @@ def call(JobConfiguration config) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Запуск синтакс-проверки
|
// Запуск синтакс-проверки
|
||||||
cmd(command, true)
|
VRunner.exec(command, true)
|
||||||
|
|
||||||
junit allowEmptyResults: true, testResults: FileUtils.getLocalPath(pathToJUnitReport)
|
junit allowEmptyResults: true, testResults: FileUtils.getLocalPath(pathToJUnitReport)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user