diff --git a/build.gradle.kts b/build.gradle.kts index dd06aaf..afd047a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,6 @@ plugins { repositories { mavenCentral() - maven(url = "https://repo.jenkins-ci.org/releases/") } tasks { diff --git a/src/ru/pulsar/jenkins/library/steps/InitFromFiles.groovy b/src/ru/pulsar/jenkins/library/steps/InitFromFiles.groovy index 70fb0a9..2bc967b 100644 --- a/src/ru/pulsar/jenkins/library/steps/InitFromFiles.groovy +++ b/src/ru/pulsar/jenkins/library/steps/InitFromFiles.groovy @@ -26,7 +26,6 @@ class InitFromFiles implements Serializable { return } - steps.installLocalDependencies(); Logger.println("Распаковка файлов") @@ -42,9 +41,6 @@ class InitFromFiles implements Serializable { srcDir = config.srcDir; } - def createInfobase = new CreateInfobase(config) - createInfobase.run() - Logger.println("Выполнение загрузки конфигурации из файлов") String vrunnerPath = VRunner.getVRunnerPath(); def command = "$vrunnerPath update-dev --src $srcDir --ibconnection \"/F./build/ib\"" diff --git a/src/ru/pulsar/jenkins/library/steps/InitFromStorage.groovy b/src/ru/pulsar/jenkins/library/steps/InitFromStorage.groovy index a9f24de..cf1c213 100644 --- a/src/ru/pulsar/jenkins/library/steps/InitFromStorage.groovy +++ b/src/ru/pulsar/jenkins/library/steps/InitFromStorage.groovy @@ -32,7 +32,6 @@ class InitFromStorage implements Serializable { return } - steps.installLocalDependencies() String storageVersion = VersionParser.storage() String storageVersionParameter = storageVersion == "" ? "" : "--storage-ver $storageVersion" @@ -44,9 +43,6 @@ class InitFromStorage implements Serializable { String storageCredentials = secrets.storage == UNKNOWN_ID ? repoSlug + "_STORAGE_USER" : secrets.storage String storagePath = secrets.storagePath == UNKNOWN_ID ? repoSlug + "_STORAGE_PATH" : secrets.storagePath - def createInfobase = new CreateInfobase(config) - createInfobase.run() - steps.withCredentials([ steps.usernamePassword( storageCredentials, diff --git a/vars/createInfobase.groovy b/vars/createInfobase.groovy new file mode 100644 index 0000000..e908d85 --- /dev/null +++ b/vars/createInfobase.groovy @@ -0,0 +1,10 @@ +import ru.pulsar.jenkins.library.configuration.JobConfiguration +import ru.pulsar.jenkins.library.ioc.ContextRegistry +import ru.pulsar.jenkins.library.steps.CreateInfobase + +def call(JobConfiguration config) { + ContextRegistry.registerDefaultContext(this) + + def createInfobase = new CreateInfobase(config) + createInfobase.run() +} \ No newline at end of file diff --git a/vars/pipeline1C.groovy b/vars/pipeline1C.groovy index e8a20f9..93f87e1 100644 --- a/vars/pipeline1C.groovy +++ b/vars/pipeline1C.groovy @@ -94,6 +94,7 @@ void call() { createDir('build/out/') script { + createInfobase config if (config.infoBaseFromFiles()) { // Создание базы загрузкой из файлов initFromFiles config