GIS-1621 - Remove redundant parameters; Deprecate old APIs
This commit is contained in:
parent
bdfa7aecbc
commit
e2dac1558f
3 changed files with 14 additions and 16 deletions
|
|
@ -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...."
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue