Create a meta folder seperate from other artifacts

This commit is contained in:
Dan Hawkins 2018-11-18 21:23:41 +00:00
commit c3458cde4f
2 changed files with 20 additions and 1 deletions

View file

@ -26,7 +26,7 @@ def getautobuildpath() {
}
// Start up boilderplate
def start(autobuildpath = autobuildroot, commonscriptspath = commonscriptsroot) {
def start(productname = "", jirakey = "", autobuildpath = autobuildroot, commonscriptspath = commonscriptsroot) {
echo "Starting...."
autobuildroot = autobuildpath
@ -37,6 +37,9 @@ def start(autobuildpath = autobuildroot, commonscriptspath = commonscriptsroot)
def metafolder = load("${commonscripts()}/meta/folder.groovy")
metafolder.metareset()
def productinfo = load("${commonscripts()}/product/info.groovy")
productinfo.setname(productname, jirakey)
def ch = load("${commonscripts()}/configuration/configuration.groovy")
ch.registerPipelineScriptConfiguration()
}

16
product/info.groovy Normal file
View file

@ -0,0 +1,16 @@
metafolder = load("${autobuilder.commonscripts()}/meta/folder.groovy")
PRODUCTFOLDER = "${metafolder.METAFOLDERNAME}/product"
env.PRODUCTARTIFACTS = "${PRODUCTFOLDER}/**"
def setname(productname = "", jirakey = "") {
def productdata = [
'name' : productname.trim(),
'jirakey' : jirakey.trim()
]
def outJson = readJSON text: groovy.json.JsonOutput.toJson(productdata)
def PRODUCTFILE = "${PRODUCTFOLDER}/info.json"
writeJSON(file: PRODUCTFILE, json: outJson, pretty: 4)
}
return this;