Create a meta folder seperate from other artifacts
This commit is contained in:
parent
818e4995f7
commit
c3458cde4f
2 changed files with 20 additions and 1 deletions
|
|
@ -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
16
product/info.groovy
Normal 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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue