Improve meta gathering
This commit is contained in:
parent
fdea15232d
commit
820586ccd2
2 changed files with 22 additions and 14 deletions
|
|
@ -1,10 +1,8 @@
|
|||
|
||||
metafolder = load("${autobuilder.commonscripts()}/meta/folder.groovy")
|
||||
env.DIFFERENCEARTIFACTS = "${metafolder.METAFOLDERNAME}/differences/**"
|
||||
DIFFERENCEFOLDER = "${WORKSPACE}/${metafolder.METAFOLDERNAME}/differences"
|
||||
|
||||
def differences(sourcerevision, previoussourcerevision, sourcepath, jirakey, difffolder = "${DIFFERENCEFOLDER}") {
|
||||
cs = autobuilder.commonscripts()
|
||||
def differences(meta, String sourcerevision, String previoussourcerevision, String sourcepath) {
|
||||
def String cs = autobuilder.commonscripts()
|
||||
def String difffolder = meta.folder()
|
||||
def String jirakey = meta.productinfo.jirakey
|
||||
if (isUnix()) {
|
||||
sh """
|
||||
"${PYTHON}" -u "${cs}/differences/show_release_differences.py" -g "${sourcepath}" -s "${sourcerevision}" -p "${previoussourcerevision}" -j "${jirakey}" -o "opposite notcommon" -d "${difffolder}"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
|
||||
METAFOLDERNAME = "meta"
|
||||
env.METAARTIFACTS = "${METAFOLDERNAME}/**"
|
||||
|
||||
abstract class GISJsonSerialised implements Serializable {
|
||||
def script
|
||||
|
||||
|
|
@ -20,7 +17,7 @@ abstract class GISJsonSerialised implements Serializable {
|
|||
class ProductInfo extends GISJsonSerialised {
|
||||
private String productname
|
||||
private String subcomponentname
|
||||
private String jirakey
|
||||
String jirakey
|
||||
|
||||
ProductInfo(script, productname = "", subcomponentname = "", jirakey = "") {
|
||||
super(script)
|
||||
|
|
@ -191,6 +188,10 @@ class ConfigurationInfo extends GISJsonSerialised {
|
|||
}
|
||||
|
||||
class MetaInfo extends GISJsonSerialised {
|
||||
private String METAFOLDERNAME = "meta"
|
||||
private String METAFILENAME = "info.json"
|
||||
private String METAARTIFACTS = "${METAFOLDERNAME}/**"
|
||||
|
||||
private String format = '0.1'
|
||||
ProductInfo productinfo
|
||||
GitInfo gitinfo
|
||||
|
|
@ -250,17 +251,26 @@ class MetaInfo extends GISJsonSerialised {
|
|||
return data
|
||||
}
|
||||
|
||||
def setproductinfo(productname, subcomponentname, jirakey) {
|
||||
productinfo.set(productname, subcomponentname, jirakey)
|
||||
|
||||
String folder() {
|
||||
return METAFOLDERNAME
|
||||
}
|
||||
|
||||
String generateartifacts() {
|
||||
def String metafilepath = "${METAFOLDERNAME}/${METAFILENAME}"
|
||||
saveJsonSerialised(metafilepath)
|
||||
return METAARTIFACTS
|
||||
}
|
||||
}
|
||||
|
||||
MetaInfo metareset(script) {
|
||||
echo "Resetting meta folder"
|
||||
dir("${WORKSPACE}/${METAFOLDERNAME}") {
|
||||
def mi = new MetaInfo(script)
|
||||
|
||||
dir(mi.folder()) {
|
||||
deleteDir()
|
||||
}
|
||||
return new MetaInfo(script)
|
||||
return mi
|
||||
}
|
||||
|
||||
return this;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue