Add publish item selector script; Add eclipse groovy project
This commit is contained in:
parent
b480d4a965
commit
18f6b42a56
5 changed files with 38 additions and 23 deletions
9
publish/.classpath
Normal file
9
publish/.classpath
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry excluding="publish.groovy" kind="src" path=""/>
|
||||
<classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/>
|
||||
<classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>
|
||||
<classpathentry kind="lib" path="/home/dan/.sdkman/candidates/groovy/2.5.6/lib/groovy-json-2.5.6.jar"/>
|
||||
<classpathentry kind="output" path=""/>
|
||||
</classpath>
|
||||
7
publish/.gitignore
vendored
Normal file
7
publish/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
/do$_publish_closure4.class
|
||||
/do$_resetfolders_closure1.class
|
||||
/do$_resetfolders_closure2.class
|
||||
/do$_resetfolders_closure3.class
|
||||
/do$_stripgithistory_closure5.class
|
||||
/do.class
|
||||
/publish_item_select.class
|
||||
18
publish/.project
Normal file
18
publish/.project
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>publish_item_select</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
3
publish/.settings/org.eclipse.jdt.groovy.core.prefs
Normal file
3
publish/.settings/org.eclipse.jdt.groovy.core.prefs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
eclipse.preferences.version=1
|
||||
groovy.compiler.level=25
|
||||
groovy.script.filters=**/*.dsld,y,**/*.gradle,n
|
||||
|
|
@ -5,8 +5,6 @@ metalevels = 2
|
|||
|
||||
commonscriptsrepo="git@hydra:jenkinsautobuild/Common_scripts.git"
|
||||
|
||||
import hudson.model.*
|
||||
|
||||
def log(message) {
|
||||
boolean dolog = true
|
||||
if (dolog) {
|
||||
|
|
@ -52,14 +50,10 @@ def gitCloneOrPull(String repo, String folder) {
|
|||
|
||||
def loadmetaclass(String commonscripts, String metafolder) {
|
||||
def metafolderscriptfile = "${commonscripts}/meta/folder.groovy"
|
||||
log("Loading script: ${metafolderscriptfile}")
|
||||
|
||||
GroovyShell shell = new GroovyShell()
|
||||
def metafolderscript = shell.parse(new File(metafolderscriptfile))
|
||||
log("metafolderscript is ${metafolderscript.getClass()}")
|
||||
def meta = metafolderscript.metafromfolderSlurper(metafolder)
|
||||
log("meta is ${meta.getClass()}")
|
||||
|
||||
return meta
|
||||
}
|
||||
|
||||
|
|
@ -68,7 +62,6 @@ def makeworking() {
|
|||
r.waitFor()
|
||||
def user = r.text.trim()
|
||||
|
||||
log("User is ${user}")
|
||||
def rootfolder = "/home/${user}/tmp"
|
||||
createfolder(rootfolder)
|
||||
|
||||
|
|
@ -82,8 +75,6 @@ def makeworking() {
|
|||
|
||||
// Load the meta folder class that interprets the meta repo
|
||||
def meta = loadmetaclass(commonscripts, metareporoot)
|
||||
log("2: meta is ${meta.getClass()}")
|
||||
|
||||
return meta
|
||||
}
|
||||
|
||||
|
|
@ -93,21 +84,9 @@ def List<String> getItems(meta) {
|
|||
log("metaitems is ${metaitems.getClass()}")
|
||||
|
||||
try {
|
||||
log("Getting items")
|
||||
def p = ['pwd'].execute()
|
||||
p.waitFor()
|
||||
menuitems.add(p.text.trim())
|
||||
menuitems.add(metarepoext)
|
||||
menuitems.add(metalevels)
|
||||
|
||||
menuitems.add("ATLAS_SERVICES CORE_INSTALL installers/**")
|
||||
|
||||
menuitems.add("Item 2")
|
||||
menuitems.add("Item 3")
|
||||
for (key in metaitems.keySet()) {
|
||||
def releaseinfo = metaitems[key]
|
||||
menuitems.add(releaseinfo.offsetpath)
|
||||
//MetaInfo meta
|
||||
}
|
||||
return menuitems
|
||||
} catch (Exception e) {
|
||||
|
|
@ -117,10 +96,9 @@ def List<String> getItems(meta) {
|
|||
}
|
||||
|
||||
def meta = makeworking()
|
||||
log("3: meta is ${meta.getClass()}")
|
||||
def items = getItems(meta)
|
||||
|
||||
count = 0
|
||||
def items = getItems(meta)
|
||||
for (item in items) {
|
||||
count += 1
|
||||
log ("${count}: ${item}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue