Handle an optional release repo variant suffix
This commit is contained in:
parent
ecaed89cce
commit
45f443de49
1 changed files with 19 additions and 3 deletions
|
|
@ -34,8 +34,22 @@ def getmetafolderscript() {
|
|||
return metafolderscript
|
||||
}
|
||||
|
||||
def alterreleaserepo(String releaserepo, String releaserepovariantsuffix) {
|
||||
def String altered = releaserepo.trim()
|
||||
def String dotgit = '.git'
|
||||
|
||||
if (releaserepovariantsuffix?.trim()) {
|
||||
if altered.endsWith(dotgit) {
|
||||
altered = altered.dropRight(dotgit.length()) '_' + releaserepovariantsuffix + dotgit
|
||||
} else {
|
||||
altered = altered + '_' + releaserepovariantsuffix
|
||||
}
|
||||
}
|
||||
return altered
|
||||
}
|
||||
|
||||
// Start up boilderplate
|
||||
def startbuild(script, String productname = PRODUCT_NAME, String subcomponentname = SUBCOMPONENT_NAME, String releaserepo = RELEASE_REPO, String autobuildpath = autobuildroot, String commonscriptspath = commonscriptsroot) {
|
||||
def startbuild(script, String productname = PRODUCT_NAME, String subcomponentname = SUBCOMPONENT_NAME, String releaserepo = RELEASE_REPO, String releaserepovariantsuffix = '', String autobuildpath = autobuildroot, String commonscriptspath = commonscriptsroot) {
|
||||
echo "Starting...."
|
||||
|
||||
autobuildroot = autobuildpath
|
||||
|
|
@ -52,8 +66,10 @@ def startbuild(script, String productname = PRODUCT_NAME, String subcomponentnam
|
|||
meta.jenkinsbuildinfo.set(JOB_NAME, BUILD_ID.toInteger(), NODE_NAME, now.toString())
|
||||
|
||||
def rr = load("${commonscripts()}/release/registerrepo.groovy")
|
||||
echo "Release repo: ${releaserepo}"
|
||||
rr.registerrepo(meta, releaserepo)
|
||||
def String alteredreleaserepo = alterreleaserepo(releaserepo, releaserepovariantsuffix)
|
||||
|
||||
echo "Release repo: ${alteredreleaserepo}"
|
||||
rr.registerrepo(meta, alteredreleaserepo)
|
||||
|
||||
def ch = load("${commonscripts()}/configuration/configuration.groovy")
|
||||
ch.registerPipelineScriptConfiguration(meta)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue