You've already forked jenkins-lib
forked from jenkins/jenkins-lib
Merge branch 'develop' into yaxunit-pr
This commit is contained in:
@@ -68,7 +68,7 @@ pipeline1C()
|
||||
|
||||
## Внешний вид пайплайна в интерфейсе Blue Ocean
|
||||
|
||||

|
||||

|
||||
|
||||
## Конфигурирование
|
||||
|
||||
|
@@ -72,6 +72,8 @@ interface IStepExecutor {
|
||||
|
||||
def unstash(String name)
|
||||
|
||||
def unstable(String message)
|
||||
|
||||
def zip(String dir, String zipFile)
|
||||
|
||||
def zip(String dir, String zipFile, String glob)
|
||||
|
@@ -159,6 +159,11 @@ class StepExecutor implements IStepExecutor {
|
||||
steps.unstash name
|
||||
}
|
||||
|
||||
@Override
|
||||
def unstable(String message) {
|
||||
steps.unstable message
|
||||
}
|
||||
|
||||
@Override
|
||||
def zip(String dir, String zipFile, String glob = '') {
|
||||
steps.zip dir: dir, zipFile: zipFile, glob: glob, overwrite: true
|
||||
|
@@ -8,7 +8,7 @@ import ru.pulsar.jenkins.library.utils.VRunner
|
||||
|
||||
class Bdd implements Serializable {
|
||||
|
||||
private final JobConfiguration config;
|
||||
private final JobConfiguration config
|
||||
|
||||
Bdd(JobConfiguration config) {
|
||||
this.config = config
|
||||
@@ -27,15 +27,21 @@ class Bdd implements Serializable {
|
||||
List<String> logosConfig = ["LOGOS_CONFIG=$config.logosConfig"]
|
||||
steps.withEnv(logosConfig) {
|
||||
steps.installLocalDependencies()
|
||||
|
||||
steps.createDir('build/out')
|
||||
|
||||
steps.catchError {
|
||||
List<Integer> returnStatuses = []
|
||||
config.bddOptions.vrunnerSteps.each {
|
||||
Logger.println("Шаг запуска сценариев командой ${it}")
|
||||
String vrunnerPath = VRunner.getVRunnerPath();
|
||||
VRunner.exec("$vrunnerPath ${it} --ibconnection \"/F./build/ib\"")
|
||||
String vrunnerPath = VRunner.getVRunnerPath()
|
||||
Integer bddReturnStatus = VRunner.exec("$vrunnerPath ${it} --ibconnection \"/F./build/ib\"", true)
|
||||
returnStatuses.add(bddReturnStatus)
|
||||
}
|
||||
|
||||
if (Collections.max(returnStatuses) > 2) {
|
||||
steps.error("Получен неожиданный/неверный результат работы. Возможно, работа 1С:Предприятие завершилась некорректно, или возникла ошибка при запуске")
|
||||
} else if (returnStatuses.contains(1)) {
|
||||
steps.unstable("Тестирование сценариев завершилось, но часть фич/сценариев упала")
|
||||
} else {
|
||||
Logger.println("Тестирование сценариев завершилось успешно")
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -106,6 +106,18 @@ void call() {
|
||||
}
|
||||
}
|
||||
|
||||
stage('Загрузка расширений в конфигурацию'){
|
||||
when {
|
||||
beforeAgent true
|
||||
expression { config.needLoadExtensions() }
|
||||
}
|
||||
steps {
|
||||
timeout(time: config.timeoutOptions.loadExtensions, unit: TimeUnit.MINUTES) {
|
||||
loadExtensions config
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Инициализация ИБ') {
|
||||
when {
|
||||
beforeAgent true
|
||||
@@ -119,17 +131,6 @@ void call() {
|
||||
}
|
||||
}
|
||||
|
||||
stage('Загрузка расширений в конфигурацию'){
|
||||
when {
|
||||
beforeAgent true
|
||||
expression { config.needLoadExtensions() }
|
||||
}
|
||||
steps {
|
||||
timeout(time: config.timeoutOptions.loadExtensions, unit: TimeUnit.MINUTES) {
|
||||
loadExtensions config
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Архивация ИБ') {
|
||||
steps {
|
||||
|
Reference in New Issue
Block a user