Start writing format version into meta data file
This commit is contained in:
parent
74ad66b199
commit
c66149252d
1 changed files with 14 additions and 25 deletions
|
|
@ -20,14 +20,13 @@ abstract class GISJsonSerialised implements Serializable {
|
|||
}
|
||||
|
||||
class ProductInfo extends GISJsonSerialised {
|
||||
private static String FORMAT = '0.1'
|
||||
String productname
|
||||
String subcomponentname
|
||||
String variant
|
||||
|
||||
ProductInfo(script, productname = "", subcomponentname = "", variant = "") {
|
||||
super(script)
|
||||
this.format = FORMAT
|
||||
this.format = '0.1'
|
||||
this.productname = productname
|
||||
this.subcomponentname = subcomponentname
|
||||
this.variant = variant
|
||||
|
|
@ -97,7 +96,6 @@ class ProductInfo extends GISJsonSerialised {
|
|||
}
|
||||
|
||||
class GitInfo extends GISJsonSerialised {
|
||||
private static String FORMAT = '0.1'
|
||||
private String sourcepath
|
||||
private String sourcerevision
|
||||
private String gitrevision
|
||||
|
|
@ -106,7 +104,7 @@ class GitInfo extends GISJsonSerialised {
|
|||
|
||||
GitInfo(script, sourcepath = "", sourcerevision = "", gitrevision = "", remoteurl = "", remoteinfo = "") {
|
||||
super(script)
|
||||
this.format = FORMAT
|
||||
this.format = '0.1'
|
||||
this.sourcepath = sourcepath
|
||||
this.sourcerevision = sourcerevision
|
||||
this.gitrevision = gitrevision
|
||||
|
|
@ -162,14 +160,13 @@ class GitInfo extends GISJsonSerialised {
|
|||
}
|
||||
|
||||
class JenkinsBuildParameter extends GISJsonSerialised {
|
||||
private static String FORMAT = '0.1'
|
||||
private String name
|
||||
private String valuetype
|
||||
private String value
|
||||
|
||||
JenkinsBuildParameter(script, String name = '', String valuetype = '', String value = '') {
|
||||
super(script)
|
||||
this.format = FORMAT
|
||||
this.format = '0.1'
|
||||
this.name = name
|
||||
this.valuetype = valuetype
|
||||
this.value = value
|
||||
|
|
@ -200,7 +197,6 @@ class JenkinsBuildParameter extends GISJsonSerialised {
|
|||
}
|
||||
|
||||
class JenkinsBuildInfo extends GISJsonSerialised {
|
||||
private static String FORMAT = '0.1'
|
||||
String buildjobname
|
||||
int buildnumber
|
||||
private String buildmachine
|
||||
|
|
@ -210,7 +206,7 @@ class JenkinsBuildInfo extends GISJsonSerialised {
|
|||
|
||||
JenkinsBuildInfo(script, String buildjobname = "", int buildnumber = 0, String buildmachine = "", String builddate = "", boolean isfullbuild = true) {
|
||||
super(script)
|
||||
this.format = FORMAT
|
||||
this.format = '0.1'
|
||||
this.buildjobname = buildjobname
|
||||
this.buildnumber = buildnumber
|
||||
this.buildmachine = buildmachine
|
||||
|
|
@ -281,14 +277,13 @@ class JenkinsBuildInfo extends GISJsonSerialised {
|
|||
}
|
||||
|
||||
class BuildStampInfo extends GISJsonSerialised {
|
||||
private static String FORMAT = '0.1'
|
||||
String buildstampprefix
|
||||
int revision
|
||||
String buildstamp
|
||||
|
||||
BuildStampInfo(script, buildstampprefix = "0.30000.0.", revision = 0, buildstamp = "0.30000.0.0") {
|
||||
super(script)
|
||||
this.format = FORMAT
|
||||
this.format = '0.1'
|
||||
this.buildstampprefix = buildstampprefix
|
||||
this.revision = revision
|
||||
this.buildstamp = buildstamp
|
||||
|
|
@ -369,14 +364,13 @@ class BuildStampInfo extends GISJsonSerialised {
|
|||
}
|
||||
|
||||
class ReleaseInfo extends GISJsonSerialised {
|
||||
private static String FORMAT = '0.1'
|
||||
String releaserepoURL
|
||||
ArrayList<String> releaseitems
|
||||
boolean released
|
||||
|
||||
ReleaseInfo(script, String releaserepoURL = "", boolean released = false) {
|
||||
super(script)
|
||||
this.format = FORMAT
|
||||
this.format = '0.1'
|
||||
this.releaserepoURL = releaserepoURL
|
||||
this.releaseitems = new ArrayList<String>()
|
||||
this.released = released
|
||||
|
|
@ -425,7 +419,6 @@ class ReleaseInfo extends GISJsonSerialised {
|
|||
}
|
||||
|
||||
class ConfigurationInfo extends GISJsonSerialised {
|
||||
private static String FORMAT = '0.1'
|
||||
private String configurationname
|
||||
private String configurationURL
|
||||
private String configurationversion
|
||||
|
|
@ -433,7 +426,7 @@ class ConfigurationInfo extends GISJsonSerialised {
|
|||
|
||||
ConfigurationInfo(script, configurationname = "", configurationURL = "", configurationversion = "", configurationSHA = "") {
|
||||
super(script)
|
||||
this.format = FORMAT
|
||||
this.format = '0.1'
|
||||
this.configurationname = configurationname
|
||||
this.configurationURL = configurationURL
|
||||
this.configurationversion = configurationversion
|
||||
|
|
@ -485,13 +478,12 @@ class ChecksumPair extends GISJsonSerialised {
|
|||
}
|
||||
|
||||
class ChecksumSet extends GISJsonSerialised {
|
||||
private static String FORMAT = '0.1'
|
||||
private String artifactpath
|
||||
private ArrayList<ChecksumPair> checksumpairs
|
||||
|
||||
ChecksumSet(script, artifactpath = "") {
|
||||
super(script)
|
||||
this.format = FORMAT
|
||||
this.format = '0.1'
|
||||
this.artifactpath = artifactpath
|
||||
checksumpairs = new ArrayList<ChecksumPair>()
|
||||
}
|
||||
|
|
@ -532,12 +524,11 @@ class ChecksumSet extends GISJsonSerialised {
|
|||
}
|
||||
|
||||
class ChecksumInfo extends GISJsonSerialised {
|
||||
private static String FORMAT = '0.1'
|
||||
private ArrayList<ChecksumSet> checksumsets
|
||||
|
||||
ChecksumInfo(script) {
|
||||
super(script)
|
||||
this.format = FORMAT
|
||||
this.format = '0.1'
|
||||
checksumsets = new ArrayList<ChecksumSet>()
|
||||
}
|
||||
|
||||
|
|
@ -575,12 +566,11 @@ class ChecksumInfo extends GISJsonSerialised {
|
|||
}
|
||||
|
||||
class PublishableInfo extends GISJsonSerialised {
|
||||
private static String FORMAT = '0.1'
|
||||
private String filepath
|
||||
|
||||
PublishableInfo(script, String filepath = "") {
|
||||
super(script)
|
||||
this.format = FORMAT
|
||||
this.format = '0.1'
|
||||
this.filepath = filepath
|
||||
}
|
||||
|
||||
|
|
@ -599,7 +589,6 @@ class PublishableInfo extends GISJsonSerialised {
|
|||
}
|
||||
|
||||
class MetaInfo extends GISJsonSerialised {
|
||||
private static String FORMAT = '0.1'
|
||||
private static String METAFOLDERNAME = 'meta'
|
||||
private static String METAFILENAME = 'info.json'
|
||||
private static String METAARTIFACTS = "${METAFOLDERNAME}/**"
|
||||
|
|
@ -610,7 +599,7 @@ class MetaInfo extends GISJsonSerialised {
|
|||
|
||||
RelatedMetaInfo(script, offsetpath = "", MetaInfo meta = null) {
|
||||
super(script)
|
||||
this.format = FORMAT
|
||||
this.format = '0.1'
|
||||
this.offsetpath = offsetpath
|
||||
this.meta = meta
|
||||
}
|
||||
|
|
@ -632,7 +621,7 @@ class MetaInfo extends GISJsonSerialised {
|
|||
}
|
||||
}
|
||||
|
||||
private String format = FORMAT
|
||||
private String format = '0.1'
|
||||
ProductInfo productinfo
|
||||
GitInfo gitinfo
|
||||
JenkinsBuildInfo jenkinsbuildinfo
|
||||
|
|
@ -720,7 +709,7 @@ class MetaInfo extends GISJsonSerialised {
|
|||
}
|
||||
|
||||
void deserialiseJson(rawmeta) {
|
||||
if (rawmeta['format'] != FORMAT) {
|
||||
if (rawmeta['format'] != '0.1') {
|
||||
script.error("Unsupported meta format found at ${filepath}")
|
||||
return
|
||||
}
|
||||
|
|
@ -969,9 +958,9 @@ class MetaInfo extends GISJsonSerialised {
|
|||
}
|
||||
|
||||
MetaInfo metareset(script) {
|
||||
echo "Resetting meta folder"
|
||||
def mi = new MetaInfo(script)
|
||||
|
||||
echo "Resetting meta folder"
|
||||
dir(mi.folder()) {
|
||||
deleteDir()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue