1
0

Запуск синтаксического контроля

This commit is contained in:
Nikita Gryzlov
2020-04-17 12:01:43 +03:00
parent 40fc1b4cc8
commit 66ac4b10c9
9 changed files with 128 additions and 11 deletions

39
vars/syntaxCheck.groovy Normal file
View File

@@ -0,0 +1,39 @@
import hudson.FilePath
import ru.pulsar.jenkins.library.configuration.JobConfiguration
import ru.pulsar.jenkins.library.ioc.ContextRegistry
def call(JobConfiguration config) {
ContextRegistry.registerDefaultContext(this)
printLocation()
def options = config.syntaxCheckOptions
if (!options.enabled) {
echo("Syntax-check step is disabled")
return
}
installLocalDependencies()
unzipInfobase()
def junitPath = new FilePath(new File(options.pathToJUnitReport))
junitPath.mkdirs()
String command = "oscript_modules/bin/vrunner syntax-check --ibconnection \"/F./build/ib\""
if (options.groupErrorsByMetadata) {
command += " --groupbymetadata"
}
command += " --junitpath " + options.pathToJUnitReport;
command += " --mode " + options.checkModes.join(" ")
// Запуск синтакс-проверки
cmd(command, true)
junit allowEmptyResults: true, testResults: options.pathToJUnitReport
}