Skip to content

Commit

Permalink
Merge pull request #91 from firstBitMarksistskaya/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
nixel2007 authored Nov 21, 2022
2 parents 196e622 + 065be12 commit d66aa80
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 8 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

## Возможности

1. Все шаги можно запустить на базе docker-образов из https://github.com/firstBitSemenovskaya/onec-docker. См. [памятку по слоям и последовательности сборки](https://github.com/firstBitSemenovskaya/onec-docker/blob/feature/first-bit/Layers.md).
1. Все шаги можно запустить на базе docker-образов из https://github.com/firstBitMarksistskaya/onec-docker. См. [памятку по слоям и последовательности сборки](https://github.com/firstBitMarksistskaya/onec-docker/blob/feature/first-bit/Layers.md).
1. Поддержка как формата выгрузки из Конфигуратора, так и формата EDT.
1. Подготовка информационной базы по версии из хранилища конфигурации, из исходных файлов конфигурации, комбинированный режим (основная ветка - из хранилища, остальные - из исходников).
1. Запуск ИБ в режиме выполнения обработчиков обновления БСП.
Expand Down Expand Up @@ -83,7 +83,7 @@ pipeline1C()

```json
{
"$schema": "https://raw.githubusercontent.com/firstBitSemenovskaya/jenkins-lib/master/resources/schema.json",
"$schema": "https://raw.githubusercontent.com/firstBitMarksistskaya/jenkins-lib/master/resources/schema.json",
"v8version": "8.3.14.1976",
"edtVersion": "2021.3.4:x86_64",
"secrets": {
Expand Down Expand Up @@ -164,4 +164,4 @@ pipeline1C()
* при нестабильной сборке (упавшие тесты) - разработчики и запустивший сборку.
* Прямые получатели уведомлений не заполнены (`notifications` -> `email` -> `*options` -> `directRecipients`).
* Telegram:
* Уведомления о результатах сборки по умолчанию рассылаются всегда (`notifications` -> `telegram` -> `onAlways`, `onFailure`, `onUnstable`, `onSuccess`).
* Уведомления о результатах сборки по умолчанию рассылаются всегда (`notifications` -> `telegram` -> `onAlways`, `onFailure`, `onUnstable`, `onSuccess`).
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class ConfigurationReader implements Serializable {
mergeObjects(baseConfiguration, configurationToMerge, nonMergeableSettings)
mergeInitInfoBaseOptions(baseConfiguration.initInfoBaseOptions, configurationToMerge.initInfoBaseOptions)
mergeBddOptions(baseConfiguration.bddOptions, configurationToMerge.bddOptions)
mergeSyntaxCheckOptions(baseConfiguration.syntaxCheckOptions, configurationToMerge.syntaxCheckOptions)
mergeNotificationsOptions(baseConfiguration.notificationsOptions, configurationToMerge.notificationsOptions)

return baseConfiguration;
Expand Down Expand Up @@ -126,6 +127,13 @@ class ConfigurationReader implements Serializable {
baseObject.vrunnerSteps = objectToMerge.vrunnerSteps.clone()
}

@NonCPS
private static void mergeSyntaxCheckOptions(SyntaxCheckOptions baseObject, SyntaxCheckOptions objectToMerge) {
if (objectToMerge == null || objectToMerge.checkModes == null) {
return
}
baseObject.checkModes = objectToMerge.checkModes.clone()
}

private static void mergeNotificationsOptions(NotificationsOptions baseObject, NotificationsOptions objectToMerge) {
if (objectToMerge == null) {
Expand Down
8 changes: 6 additions & 2 deletions src/ru/pulsar/jenkins/library/steps/PublishAllure.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ class PublishAllure implements Serializable {

steps = ContextRegistry.getContext().getStepExecutor()

safeUnstash('init-allure')
safeUnstash('bdd-allure')
if (config.stageFlags.initSteps) {
safeUnstash('init-allure')
}
if (config.stageFlags.bdd) {
safeUnstash('bdd-allure')
}
if (config.stageFlags.smoke && config.smokeTestOptions.publishToAllureReport) {
safeUnstash(SmokeTest.SMOKE_ALLURE_STASH)
}
Expand Down
2 changes: 1 addition & 1 deletion src/ru/pulsar/jenkins/library/steps/SmokeTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class SmokeTest implements Serializable {
}

steps.withEnv(logosConfig) {
VRunner.exec(command)
VRunner.exec(command, true)
}

if (options.publishToAllureReport) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void testCreateJobConfigurationObject() throws IOException {
.hasFieldOrPropertyWithValue("storagePath", "UNKNOWN_ID")
;

assertThat(jobConfiguration.getSyntaxCheckOptions().getCheckModes()).hasSize(1);
assertThat(jobConfiguration.getSyntaxCheckOptions().getCheckModes()).hasSize(4);

assertThat(jobConfiguration.getResultsTransformOptions().getRemoveSupport()).isFalse();
assertThat(jobConfiguration.getResultsTransformOptions().getSupportLevel()).isZero();
Expand Down
7 changes: 6 additions & 1 deletion test/unit/resources/jobConfiguration.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@
"branchAnalysisConfiguration": "auto"
},
"syntaxCheck": {
"checkModes": ["-ThinClient"]
"checkModes": [
"-ThickClient",
"-ThinClient",
"-WebClient",
"-Server"
]
},
"resultsTransform": {
"removeSupport": false
Expand Down

0 comments on commit d66aa80

Please sign in to comment.