From 1402449b83cd6c508d6232127ecc2db8fc714a7f Mon Sep 17 00:00:00 2001 From: Dima Date: Sat, 9 Nov 2024 20:01:17 +0300 Subject: [PATCH] edt validate with 1cedtcli --- .../jenkins/library/steps/EdtValidate.groovy | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/ru/pulsar/jenkins/library/steps/EdtValidate.groovy b/src/ru/pulsar/jenkins/library/steps/EdtValidate.groovy index 70efc79f..c94710bc 100644 --- a/src/ru/pulsar/jenkins/library/steps/EdtValidate.groovy +++ b/src/ru/pulsar/jenkins/library/steps/EdtValidate.groovy @@ -7,6 +7,7 @@ import ru.pulsar.jenkins.library.ioc.ContextRegistry import ru.pulsar.jenkins.library.utils.EDT import ru.pulsar.jenkins.library.utils.FileUtils import ru.pulsar.jenkins.library.utils.Logger +import ru.pulsar.jenkins.library.utils.VersionParser class EdtValidate implements Serializable { @@ -55,9 +56,25 @@ class EdtValidate implements Serializable { Logger.println("Выполнение валидации EDT") - def ringCommand = "ring $edtVersionForRing workspace validate --workspace-location \"$workspaceLocation\" --file \"$resultFile\" $projectList" - steps.catchError { - steps.ringCommand(ringCommand) + if (VersionParser.compare(config.edtVersion, "2024") < 0) { + + Logger.println("Версия EDT меньше 2024.1.X, для валидации используется ring") + + def ringCommand = "ring $edtVersionForRing workspace validate --workspace-location \"$workspaceLocation\" --file \"$resultFile\" $projectList" + steps.catchError { + steps.ringCommand(ringCommand) + } + + } else { + + Logger.println("Версия EDT больше 2024.1.X, для валидации используется 1cedtcli") + + def edtcliCommand = "1cedtcli -data \"$workspaceLocation\" -command validate --file \"$resultFile\" $projectList" + steps.catchError { + def stdOut = steps.cmd(edtcliCommand, false, true) + Logger.println(stdOut) + } + } steps.archiveArtifacts("$DesignerToEdtFormatTransformation.WORKSPACE/.metadata/.log")