diff --git a/autobuilder.groovy b/autobuilder.groovy index 63ca2de..35b9f6f 100644 --- a/autobuilder.groovy +++ b/autobuilder.groovy @@ -1,10 +1,8 @@ // Assume that WORKSPACE environment variable is set -autobuildroot = "${WORKSPACE}/autobuild" - -commonscriptsroot = "${autobuildroot}/Common_scripts" - -metafolderscript = null +String autobuildroot = "${WORKSPACE}/autobuild" +String commonscriptsroot = "${autobuildroot}/Common_scripts" +def metafolderscript = null def conditionalclean(doclean = "${CLEAN_WORKSPACE}" == "true") { if (doclean) { @@ -32,7 +30,7 @@ def getmetafolderscript() { } // Start up boilderplate -def start(script, productname = PRODUCT_NAME, subcomponentname = SUBCOMPONENT_NAME, jirakey = JIRA_KEY, releaserepo = RELEASE_REPO, String repoRootSuffix = "", autobuildpath = autobuildroot, commonscriptspath = commonscriptsroot) { +def startbuild(script, String productname = PRODUCT_NAME, String subcomponentname = SUBCOMPONENT_NAME, String releaserepo = RELEASE_REPO, String autobuildpath = autobuildroot, String commonscriptspath = commonscriptsroot) { echo "Starting...." autobuildroot = autobuildpath @@ -42,13 +40,13 @@ def start(script, productname = PRODUCT_NAME, subcomponentname = SUBCOMPONENT_NA conditionalclean() def meta = getmetafolderscript().metareset(script) - meta.productinfo.set(productname, subcomponentname, jirakey) + meta.productinfo.set(productname, subcomponentname) def now = new Date() now.format("yyMMdd.HHmm", TimeZone.getTimeZone('UTC')) meta.jenkinsbuildinfo.set(JOB_NAME, BUILD_ID.toInteger(), NODE_NAME, now.toString()) def rr = load("${commonscripts()}/release/registerrepo.groovy") - rr.registerrepo(meta, releaserepo, repoRootSuffix) + rr.registerrepo(meta, releaserepo) def ch = load("${commonscripts()}/configuration/configuration.groovy") ch.registerPipelineScriptConfiguration(meta) @@ -56,6 +54,11 @@ def start(script, productname = PRODUCT_NAME, subcomponentname = SUBCOMPONENT_NA return meta } +def start(script, String productname = PRODUCT_NAME, String subcomponentname = SUBCOMPONENT_NAME, String jirakey = JIRA_KEY, String releaserepo = RELEASE_REPO, String repoRootSuffix = "", String autobuildpath = autobuildroot, String commonscriptspath = commonscriptsroot) { + echo "DEPRECATED method: start(script, String productname = PRODUCT_NAME, subcomponentname = SUBCOMPONENT_NAME, jirakey = JIRA_KEY, ...)" + return startbuild(script, productname, subcomponentname, releaserepo, autobuildpath, commonscriptspath) +} + // Start up boilderplate def startnonbuild(script, autobuildpath = autobuildroot, commonscriptspath = commonscriptsroot) { echo "Starting non-build job...." diff --git a/meta/folder.groovy b/meta/folder.groovy index 78286fe..96c9626 100644 --- a/meta/folder.groovy +++ b/meta/folder.groovy @@ -22,16 +22,14 @@ abstract class GISJsonSerialised implements Serializable { class ProductInfo extends GISJsonSerialised { String productname String subcomponentname - String jirakey - ProductInfo(script, productname = "", subcomponentname = "", jirakey = "") { + ProductInfo(script, productname = "", subcomponentname = "") { super(script) this.productname = productname this.subcomponentname = subcomponentname - this.jirakey = jirakey } - void set(String productname, String subcomponentname, String jirakey) { + void set(String productname, String subcomponentname) { // Make sure the fields can be used in git tags def int pstatus = 0 if (script.isUnix()) { @@ -55,20 +53,17 @@ class ProductInfo extends GISJsonSerialised { } this.productname = productname this.subcomponentname = subcomponentname - this.jirakey = jirakey } void deserialiseJson(rawmeta) { productname = rawmeta['productname'] subcomponentname = rawmeta['subcomponentname'] - jirakey = rawmeta['jirakey'] } LinkedHashMap serialisationdata() { def data = [ 'productname' : productname, 'subcomponentname' : subcomponentname, - 'jirakey' : jirakey, ] return data } diff --git a/release/registerrepo.groovy b/release/registerrepo.groovy index bd6a528..f565706 100644 --- a/release/registerrepo.groovy +++ b/release/registerrepo.groovy @@ -2,7 +2,7 @@ vc = load("${autobuilder.commonscripts()}/versioncontrol/git.groovy") // Prove the existence of the release repo - otherwise there is a large wait to cycle the build to correct the meta data -def registerrepo(meta, String releaserepo, String repoRootSuffix = "") { +def registerrepo(meta, String releaserepo) { if (releaserepo?.trim()) { vc.checkRepoExists(releaserepo) }