-
-
Save Kirill/266f832aa70dbbe71fd1c9ba84e308d1 to your computer and use it in GitHub Desktop.
CheckConfig pipeline script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node { | |
stage('Создание пустой базы и обновление из хранилища') { | |
env.RUNNER_V8VERSION='8.3.10.2505' | |
env.RUNNER_IBNAME="/F${env.WORKSPACE}/build/ib" | |
cmd("runner init-dev --storage --storage-name tcp://storage.local/master --storage-user Мороз") | |
} | |
stage('Проверка логической целостности конфигурации') { | |
cmd_failsafe('runner checkconfig --junitpath build/out/ConfigLogIntegrity.xml --mode -ConfigLogIntegrity') | |
step([$class: 'JUnitResultArchiver', testResults: '**/ConfigLogIntegrity.xml']) | |
} | |
stage('Поиск некорректных ссылок') { | |
cmd_failsafe('runner checkconfig --junitpath build/out/IncorrectReferences.xml --mode -IncorrectReferences') | |
step([$class: 'JUnitResultArchiver', testResults: '**/IncorrectReferences.xml']) | |
} | |
stage('Синтаксический контроль модулей') { | |
cmd_failsafe('runner checkconfig --junitpath build/out/SyntaxCheck.xml --mode -ThinClient -WebClient -Server -ExternalConnection -ExternalConnectionServer') | |
step([$class: 'JUnitResultArchiver', testResults: '**/SyntaxCheck.xml']) | |
} | |
stage('Поиск неиспользуемых процедур и функций') { | |
cmd_failsafe('runner checkconfig --junitpath build/out/UnreferenceProcedures.xml --mode -UnreferenceProcedures') | |
step([$class: 'JUnitResultArchiver', testResults: '**/UnreferenceProcedures.xml']) | |
} | |
stage('Проверка существования назначенных обработчиков') { | |
cmd_failsafe('runner checkconfig --junitpath build/out/HandlersExistence.xml --mode -HandlersExistence') | |
step([$class: 'JUnitResultArchiver', testResults: '**/HandlersExistence.xml']) | |
} | |
stage('Поиск пустых обработчиков') { | |
cmd_failsafe('runner checkconfig --junitpath build/out/EmptyHandlers.xml --mode -EmptyHandlers') | |
step([$class: 'JUnitResultArchiver', testResults: '**/EmptyHandlers.xml']) | |
} | |
stage('Расширенная проверка') { | |
cmd_failsafe('runner checkconfig --junitpath build/out/ExtendedModulesCheck.xml --mode -ExtendedModulesCheck') | |
step([$class: 'JUnitResultArchiver', testResults: '**/ExtendedModulesCheck.xml']) | |
} | |
} | |
def cmd(command) { | |
// при запуске Jenkins не в режиме UTF-8 нужно написать chcp 1251 вместо chcp 65001 | |
if (isUnix()) { sh "${command}" } else { bat "chcp 65001\n${command}"} | |
} | |
def cmd_failsafe(command) { | |
// при запуске Jenkins не в режиме UTF-8 нужно написать chcp 1251 вместо chcp 65001 | |
if (isUnix()) { sh "${command}" } else { bat (script: "chcp 65001\n${command}", returnStatus: true)} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment