You've already forked jenkins-lib
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:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user