From ddd07b90e4fa111c00557826f86449d15c47115c Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sun, 9 Jan 2022 16:35:51 +0000 Subject: [PATCH] CORE-348 - Provide a script that can obtain a package from a release repo --- publish/package.groovy | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/publish/package.groovy b/publish/package.groovy index 68c41f3..83084bc 100644 --- a/publish/package.groovy +++ b/publish/package.groovy @@ -50,7 +50,15 @@ pipeline { importer = load("${autobuilder.commonscripts()}/import/importer.groovy") def packageimportoptions = importer.getNewImportOptions() - packageimportoptions.jenkinsjob(PACKAGE_CREATE_JOB, PACKAGE_CREATE_JOB_SELECTOR) + // For backward compatibility - in case these parameters are not supplied + def packagelocation = params[PACKAGE_LOCATION] ?: 'Jenkins job artifact' + def packagereleaserepo = params[PACKAGE_RELEASE_REPO] ?: '' + def packagereleaserevision = params[PACKAGE_RELEASE_REVISION] ?: '' + packageimportoptions.source(packagelocation, + PACKAGE_CREATE_JOB, + PACKAGE_CREATE_JOB_SELECTOR, + packagereleaserepo, + packagereleaserevision) packageimportoptions.setincrementversionnumber(true) packagemeta = importer.artifactimport(meta, packageimportoptions, PACKAGEDEST)