Add publish item selector script; Add eclipse groovy project
This commit is contained in:
parent
18f6b42a56
commit
c4a5e7a361
1 changed files with 25 additions and 5 deletions
|
|
@ -1,19 +1,18 @@
|
|||
#!/usr/local/bin/groovy
|
||||
jobname="anythingnew"
|
||||
metarepoext = "git@hydra:print-server-releases/print_server_whole.git"
|
||||
outputselect = "description"
|
||||
metalevels = 2
|
||||
dolog = false
|
||||
|
||||
commonscriptsrepo="git@hydra:jenkinsautobuild/Common_scripts.git"
|
||||
|
||||
def log(message) {
|
||||
boolean dolog = true
|
||||
if (dolog) {
|
||||
println message
|
||||
}
|
||||
}
|
||||
|
||||
println "hello"
|
||||
|
||||
def createfolder(String folder) {
|
||||
def sout = new StringBuilder()
|
||||
def serr = new StringBuilder()
|
||||
|
|
@ -78,6 +77,22 @@ def makeworking() {
|
|||
return meta
|
||||
}
|
||||
|
||||
def String outputDescription(menuitems, releaseinfo) {
|
||||
meta = releaseinfo.meta
|
||||
|
||||
for (publishableitem in meta.publishableinfo) {
|
||||
menuitems.add("${meta.productinfo.productname} ${meta.productinfo.subcomponentname} ${publishableitem.filepath}")
|
||||
}
|
||||
}
|
||||
|
||||
def String outputSelection(menuitems, releaseinfo) {
|
||||
meta = releaseinfo.meta
|
||||
|
||||
for (publishableitem in meta.publishableinfo) {
|
||||
menuitems.add("${meta.productinfo.productname}#${meta.productinfo.subcomponentname}#${publishableitem.filepath}")
|
||||
}
|
||||
}
|
||||
|
||||
def List<String> getItems(meta) {
|
||||
def List<String> menuitems = new ArrayList<String>()
|
||||
def metaitems = meta.releasewalkerunique(metalevels)
|
||||
|
|
@ -85,8 +100,13 @@ def List<String> getItems(meta) {
|
|||
|
||||
try {
|
||||
for (key in metaitems.keySet()) {
|
||||
def releaseinfo = metaitems[key]
|
||||
menuitems.add(releaseinfo.offsetpath)
|
||||
def releaseinfo = metaitems[key]
|
||||
if (outputselect == "description") {
|
||||
outputDescription(menuitems, releaseinfo)
|
||||
}
|
||||
if (outputselect == "selection") {
|
||||
outputSelection(menuitems, releaseinfo)
|
||||
}
|
||||
}
|
||||
return menuitems
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue