1
0

Добавление отправки результатов сборки в почту и телеграм

This commit is contained in:
Nikita Fedkin
2022-05-20 20:49:35 +03:00
parent 2822b6c323
commit 25facc91fc
23 changed files with 910 additions and 10 deletions

View File

@@ -7,7 +7,9 @@
"defaultBranch": "main",
"secrets": {
"storagePath": "UNKNOWN_ID",
"storage": "UNKNOWN_ID"
"storage": "UNKNOWN_ID",
"telegramBotToken": "UNKNOWN_ID",
"telegramChatId": "UNKNOWN_ID"
},
"stages": {
"initSteps": false,
@@ -15,7 +17,9 @@
"bdd": false,
"syntaxCheck": false,
"edtValidate": false,
"smoke": false
"smoke": false,
"email": false,
"telegram": false
},
"timeout": {
"smoke": 240,
@@ -77,5 +81,52 @@
"removeSupport": true,
"supportLevel": 0
},
"notifications": {
"email": {
"onAlways": false,
"onFailure": true,
"onUnstable": false,
"onSuccess": false,
"alwaysOptions": {
"attachLog": true,
"directRecipients": [],
"recipientProviders": [
"developers",
"requestor"
]
},
"failureOptions": {
"attachLog": true,
"directRecipients": [],
"recipientProviders": [
"developers",
"requestor",
"brokenBuildSuspects"
]
},
"successOptions": {
"attachLog": false,
"directRecipients": [],
"recipientProviders": [
"developers",
"requestor"
]
},
"unstableOptions": {
"attachLog": false,
"directRecipients": [],
"recipientProviders": [
"developers",
"requestor"
]
}
},
"telegram": {
"onAlways": true,
"onFailure": false,
"onUnstable": false,
"onSuccess": false
}
},
"logosConfig": ""
}

View File

@@ -35,6 +35,14 @@
"storage" : {
"type" : "string",
"description" : "Данные авторизации в хранилище конфигурации"
},
"telegramChatId" : {
"type" : "string",
"description" : "Идентификатор telegram-чата для отправки уведомлений"
},
"telegramBotToken" : {
"type" : "string",
"description" : "Токен авторизации telegram-бота для отправки уведомлений"
}
}
},
@@ -66,6 +74,14 @@
"bdd" : {
"type" : "boolean",
"description" : "Запуск BDD сценариев включен"
},
"email" : {
"type" : "boolean",
"description" : "Выполнять рассылку результатов сборки на email"
},
"telegram" : {
"type" : "boolean",
"description" : "Выполнять рассылку результатов сборки в telegram"
}
}
},
@@ -257,6 +273,93 @@
}
}
},
"notifications" : {
"type" : "object",
"id" : "urn:jsonschema:ru:pulsar:jenkins:library:configuration:NotificationsOptions",
"description" : "Настройки рассылки результатов сборки",
"properties" : {
"email" : {
"type" : "object",
"id" : "urn:jsonschema:ru:pulsar:jenkins:library:configuration:notification:EmailNotificationOptions",
"description" : "Настройки рассылки результатов сборки через email",
"properties" : {
"onAlways" : {
"type" : "boolean",
"description" : "Отправлять всегда"
},
"onSuccess" : {
"type" : "boolean",
"description" : "Отправлять при успешной сборке"
},
"onFailure" : {
"type" : "boolean",
"description" : "Отправлять при падении сборки"
},
"onUnstable" : {
"type" : "boolean",
"description" : "Отправлять при нестабильной сборке"
},
"alwaysOptions" : {
"type" : "object",
"id" : "urn:jsonschema:ru:pulsar:jenkins:library:configuration:notification:email:EmailExtConfiguration",
"properties" : {
"attachLog" : {
"type" : "boolean"
},
"directRecipients" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"recipientProviders" : {
"type" : "array",
"items" : {
"type" : "string",
"enum" : [ "developers", "requestor", "brokenBuildSuspects", "brokenTestsSuspects" ]
}
}
}
},
"successOptions" : {
"type" : "object",
"$ref" : "urn:jsonschema:ru:pulsar:jenkins:library:configuration:notification:email:EmailExtConfiguration"
},
"failureOptions" : {
"type" : "object",
"$ref" : "urn:jsonschema:ru:pulsar:jenkins:library:configuration:notification:email:EmailExtConfiguration"
},
"unstableOptions" : {
"type" : "object",
"$ref" : "urn:jsonschema:ru:pulsar:jenkins:library:configuration:notification:email:EmailExtConfiguration"
}
}
},
"telegram" : {
"type" : "object",
"id" : "urn:jsonschema:ru:pulsar:jenkins:library:configuration:notification:TelegramNotificationOptions",
"description" : "Настройки рассылки результатов сборки через telegram",
"properties" : {
"onAlways" : {
"type" : "boolean",
"description" : "Отправлять всегда"
},
"onSuccess" : {
"type" : "boolean",
"description" : "Отправлять при успешной сборке"
},
"onFailure" : {
"type" : "boolean",
"description" : "Отправлять при падении сборки"
},
"onUnstable" : {
"type" : "boolean",
"description" : "Отправлять при нестабильной сборке"
}
}
}
}
},
"logosConfig" : {
"type" : "string",
"description" : "Конфигурация библиотеки logos. Применяется перед запуском каждой стадии сборки"