Add publish item selector script
This commit is contained in:
parent
d7a8dd14ad
commit
6cc9f1928d
1 changed files with 17 additions and 3 deletions
|
|
@ -1,5 +1,7 @@
|
|||
#!/usr/local/bin/groovy
|
||||
metarepo="git@hydra:jenkinsautobuild/Common_scripts.git"
|
||||
metarepoext = "git@hydra:HMB_XR_5601_Releases/hmb_xr_5601_whole.git"
|
||||
|
||||
commonscriptsrepo="git@hydra:jenkinsautobuild/Common_scripts.git"
|
||||
|
||||
import hudson.model.*
|
||||
|
||||
|
|
@ -46,6 +48,15 @@ def gitCloneOrPull(String repo, String folder) {
|
|||
return [sout, serr]
|
||||
}
|
||||
|
||||
def loadmetaclass(String commonscripts) {
|
||||
def metafolderscriptfile = "${commonscripts}/meta/folder.groovy"
|
||||
log("Loading script: ${metafolderscriptfile}")
|
||||
def script = new GroovyScriptEngine('.').with {
|
||||
loadScriptByName(metafolderscriptfile)
|
||||
}
|
||||
return script
|
||||
}
|
||||
|
||||
def String makeworking() {
|
||||
def r = ['whoami'].execute()
|
||||
r.waitFor()
|
||||
|
|
@ -56,8 +67,10 @@ def String makeworking() {
|
|||
createfolder(rootfolder)
|
||||
|
||||
def commonscripts = "${rootfolder}/commonscripts"
|
||||
gitCloneOrPull(metarepo, commonscripts);
|
||||
gitCloneOrPull(commonscriptsrepo, commonscripts);
|
||||
|
||||
def metascript = loadmetaclass(commonscripts)
|
||||
return metascript
|
||||
}
|
||||
|
||||
def List<String> getItems() {
|
||||
|
|
@ -67,7 +80,7 @@ def List<String> getItems() {
|
|||
def p = ['pwd'].execute()
|
||||
p.waitFor()
|
||||
items.add(p.text)
|
||||
items.add(metarepo)
|
||||
items.add(metarepoext)
|
||||
items.add(metalevels)
|
||||
|
||||
items.add("ATLAS_SERVICES CORE_INSTALL installers/**")
|
||||
|
|
@ -82,6 +95,7 @@ def List<String> getItems() {
|
|||
}
|
||||
|
||||
makeworking()
|
||||
loadmetaclass()
|
||||
count = 0
|
||||
for (item in getItems()) {
|
||||
log (count)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue