diff --git a/src/ru/pulsar/jenkins/library/steps/Swagger.groovy b/src/ru/pulsar/jenkins/library/steps/Swagger.groovy index 78f28283..2133e58c 100644 --- a/src/ru/pulsar/jenkins/library/steps/Swagger.groovy +++ b/src/ru/pulsar/jenkins/library/steps/Swagger.groovy @@ -25,11 +25,9 @@ class Swagger { Logger.printLocation() - def env = steps.env(); - steps.installLocalDependencies() - String swaggerPath = OscriptModules.getModulePath("swagger"); + String swaggerPath = OscriptModules.getAppExecutable("swagger"); steps.cmd(swaggerPath + " generate --src-path $config.srcDir --out $OUT") diff --git a/src/ru/pulsar/jenkins/library/utils/OscriptModules.groovy b/src/ru/pulsar/jenkins/library/utils/OscriptModules.groovy index b4ffb4ef..7dd17487 100644 --- a/src/ru/pulsar/jenkins/library/utils/OscriptModules.groovy +++ b/src/ru/pulsar/jenkins/library/utils/OscriptModules.groovy @@ -4,16 +4,16 @@ import ru.pulsar.jenkins.library.IStepExecutor import ru.pulsar.jenkins.library.ioc.ContextRegistry class OscriptModules { - static String getModulePath(String moduleName) { + static String getAppExecutable(String executableName) { IStepExecutor steps = ContextRegistry.getContext().getStepExecutor() - String moduleBinary = steps.isUnix() ? moduleName : "$moduleName.bat"; - String modulePath = "oscript_modules/bin/$moduleBinary"; - if (!steps.fileExists(modulePath)) { - modulePath = moduleBinary; + String executableBinary = steps.isUnix() ? executableName : "${executableName}.bat"; + String executablePath = "oscript_modules/bin/$executableBinary"; + if (!steps.fileExists(executablePath)) { + executablePath = executableBinary; } - return modulePath; + return executablePath; } } \ No newline at end of file diff --git a/vars/pipeline1C.groovy b/vars/pipeline1C.groovy index 7e7e044b..e428a7d5 100644 --- a/vars/pipeline1C.groovy +++ b/vars/pipeline1C.groovy @@ -2,7 +2,6 @@ import groovy.transform.Field import ru.pulsar.jenkins.library.configuration.JobConfiguration import ru.pulsar.jenkins.library.configuration.SourceFormat -import ru.pulsar.jenkins.library.steps.Swagger import java.util.concurrent.TimeUnit