1
0
mirror of https://github.com/firstBitMarksistskaya/jenkins-lib.git synced 2025-08-25 20:09:25 +02:00

Передача vrunner.json в syntax-check

This commit is contained in:
Nikita Gryzlov
2021-06-09 22:14:24 +03:00
parent 2819b31171
commit e0bc1e9493
4 changed files with 42 additions and 15 deletions

View File

@@ -1,5 +1,7 @@
import hudson.FilePath
import ru.pulsar.jenkins.library.configuration.JobConfiguration
import ru.pulsar.jenkins.library.ioc.ContextRegistry
import ru.pulsar.jenkins.library.utils.FileUtils
def call(JobConfiguration config) {
@@ -20,27 +22,37 @@ def call(JobConfiguration config) {
unzipInfobase()
def outPath = new File(options.pathToJUnitReport).getParent()
FilePath pathToJUnitReport = FileUtils.getFilePath("$env.WORKSPACE/$options.pathToJUnitReport")
String outPath = pathToJUnitReport.getParent()
createDir(outPath)
String command = "oscript_modules/bin/vrunner syntax-check --ibconnection \"/F./build/ib\""
String command = 'oscript_modules/bin/vrunner syntax-check --ibconnection "/F./build/ib"'
// Временно убрал передачу параметра.
// См. https://github.com/vanessa-opensource/vanessa-runner/issues/361
// command += " --workspace $env.WORKSPACE"
if (options.groupErrorsByMetadata) {
command += " --groupbymetadata"
command += ' --groupbymetadata'
}
command += " --junitpath " + options.pathToJUnitReport;
command += " --junitpath $pathToJUnitReport";
command += " --mode " + options.checkModes.join(" ")
FilePath vrunnerSettings = FileUtils.getFilePath("$env.WORKSPACE/$options.vrunnerSettings")
if (vrunnerSettings.exists()) {
command += " --settings $vrunnerSettings";
}
if (options.checkModes.length > 0) {
def checkModes = options.checkModes.join(" ")
command += " --mode $checkModes"
}
// Запуск синтакс-проверки
cmd(command, true)
junit allowEmptyResults: true, testResults: options.pathToJUnitReport
junit allowEmptyResults: true, testResults: FileUtils.getLocalPath(pathToJUnitReport)
archiveArtifacts options.pathToJUnitReport
archiveArtifacts FileUtils.getLocalPath(pathToJUnitReport)
}