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
|
## Внешний вид пайплайна в интерфейсе Blue Ocean
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Конфигурирование
|
## Конфигурирование
|
||||||
|
|
||||||
|
@@ -72,6 +72,8 @@ interface IStepExecutor {
|
|||||||
|
|
||||||
def unstash(String name)
|
def unstash(String name)
|
||||||
|
|
||||||
|
def unstable(String message)
|
||||||
|
|
||||||
def zip(String dir, String zipFile)
|
def zip(String dir, String zipFile)
|
||||||
|
|
||||||
def zip(String dir, String zipFile, String glob)
|
def zip(String dir, String zipFile, String glob)
|
||||||
|
@@ -159,6 +159,11 @@ class StepExecutor implements IStepExecutor {
|
|||||||
steps.unstash name
|
steps.unstash name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
def unstable(String message) {
|
||||||
|
steps.unstable message
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
def zip(String dir, String zipFile, String glob = '') {
|
def zip(String dir, String zipFile, String glob = '') {
|
||||||
steps.zip dir: dir, zipFile: zipFile, glob: glob, overwrite: true
|
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 {
|
class Bdd implements Serializable {
|
||||||
|
|
||||||
private final JobConfiguration config;
|
private final JobConfiguration config
|
||||||
|
|
||||||
Bdd(JobConfiguration config) {
|
Bdd(JobConfiguration config) {
|
||||||
this.config = config
|
this.config = config
|
||||||
@@ -27,15 +27,21 @@ class Bdd implements Serializable {
|
|||||||
List<String> logosConfig = ["LOGOS_CONFIG=$config.logosConfig"]
|
List<String> logosConfig = ["LOGOS_CONFIG=$config.logosConfig"]
|
||||||
steps.withEnv(logosConfig) {
|
steps.withEnv(logosConfig) {
|
||||||
steps.installLocalDependencies()
|
steps.installLocalDependencies()
|
||||||
|
|
||||||
steps.createDir('build/out')
|
steps.createDir('build/out')
|
||||||
|
List<Integer> returnStatuses = []
|
||||||
steps.catchError {
|
|
||||||
config.bddOptions.vrunnerSteps.each {
|
config.bddOptions.vrunnerSteps.each {
|
||||||
Logger.println("Шаг запуска сценариев командой ${it}")
|
Logger.println("Шаг запуска сценариев командой ${it}")
|
||||||
String vrunnerPath = VRunner.getVRunnerPath();
|
String vrunnerPath = VRunner.getVRunnerPath()
|
||||||
VRunner.exec("$vrunnerPath ${it} --ibconnection \"/F./build/ib\"")
|
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('Инициализация ИБ') {
|
stage('Инициализация ИБ') {
|
||||||
when {
|
when {
|
||||||
beforeAgent true
|
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('Архивация ИБ') {
|
stage('Архивация ИБ') {
|
||||||
steps {
|
steps {
|
||||||
|
Reference in New Issue
Block a user