From eefbb8944911ba17e6fd255f2a3c175b99c314b6 Mon Sep 17 00:00:00 2001 From: Egor Ivanov Date: Sat, 24 Aug 2024 22:32:56 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D1=81=D1=82=D0=B5=D0=BF=20createInfobase.groovy,=20=D1=83?= =?UTF-8?q?=D0=B1=D1=80=D0=B0=D0=BB=20=D0=B4=D1=83=D0=B1=D0=BB=D0=B8=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D1=83=D1=81=D1=82=D0=B0?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=BA=D0=B8=20=D0=B7=D0=B0=D0=B2=D0=B8=D1=81?= =?UTF-8?q?=D0=B8=D0=BC=D0=BE=D1=81=D1=82=D0=B5=D0=B9,=20=D0=B2=D1=8B?= =?UTF-8?q?=D0=BD=D0=B5=D1=81=20=D1=81=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=B1=D0=B0=D0=B7=D1=8B=20=D0=B8=D0=B7=20=D0=BF=D0=BE?= =?UTF-8?q?=D1=81=D0=BB=D0=B5=D0=B4=D1=83=D1=8E=D1=89=D0=B8=D1=85=20=D1=81?= =?UTF-8?q?=D1=82=D0=B5=D0=BF=D0=BE=D0=B2.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle.kts | 1 - .../pulsar/jenkins/library/steps/InitFromFiles.groovy | 4 ---- .../jenkins/library/steps/InitFromStorage.groovy | 4 ---- vars/createInfobase.groovy | 10 ++++++++++ vars/pipeline1C.groovy | 1 + 5 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 vars/createInfobase.groovy 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