26 lines
882 B
Groovy
26 lines
882 B
Groovy
|
|
metafolder = load("${autobuilder.commonscripts()}/meta/folder.groovy")
|
|
env.PUBLISHABLEARTIFACTS = "${metafolder.METAFOLDERNAME}/publishable/**"
|
|
|
|
// Generate a list of artifact files that are publishable to outside parties
|
|
def generatelist(publishable) {
|
|
def PUBLISHABLEFOLDER = "${WORKSPACE}/${metafolder.METAFOLDERNAME}/publishable"
|
|
sh """
|
|
rm -rf "${PUBLISHABLEFOLDER}"
|
|
mkdir -p "${PUBLISHABLEFOLDER}"
|
|
"""
|
|
filelist = []
|
|
for (filepath in publishable) {
|
|
def files = findFiles(glob: filepath)
|
|
for (file in files) {
|
|
if (!file.directory) {
|
|
filelist.add(file.path)
|
|
}
|
|
}
|
|
}
|
|
def outJson = readJSON text: groovy.json.JsonOutput.toJson(filelist)
|
|
def PUBLISHABLEFILE = "${PUBLISHABLEFOLDER}/list.json"
|
|
writeJSON(file: PUBLISHABLEFILE, json: outJson, pretty: 4)
|
|
}
|
|
|
|
return this;
|