Add a unique id to each product
This commit is contained in:
parent
4b3e84c72d
commit
ebb151dcea
1 changed files with 20 additions and 15 deletions
|
|
@ -24,16 +24,18 @@ class ProductInfo extends GISJsonSerialised {
|
||||||
private String productname
|
private String productname
|
||||||
private String subcomponentname
|
private String subcomponentname
|
||||||
private String variant
|
private String variant
|
||||||
|
private String uniqueid
|
||||||
|
|
||||||
ProductInfo(script, productname = "", subcomponentname = "", variant = "") {
|
ProductInfo(script, String productname = '', String subcomponentname = '', String variant = '') {
|
||||||
super(script)
|
super(script)
|
||||||
this.format = '0.1'
|
this.format = '0.1'
|
||||||
this.productname = productname
|
this.productname = productname
|
||||||
this.subcomponentname = subcomponentname
|
this.subcomponentname = subcomponentname
|
||||||
this.variant = variant
|
this.variant = variant
|
||||||
|
this.uniqueid = UUID.randomUUID().toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
void set(String productname, String subcomponentname, String variant = '') {
|
void set(String productname, String subcomponentname, String variant = '', ) {
|
||||||
// Make sure the fields can be used in git tags
|
// Make sure the fields can be used in git tags
|
||||||
def int pstatus = 0
|
def int pstatus = 0
|
||||||
if (script.isUnix()) {
|
if (script.isUnix()) {
|
||||||
|
|
@ -76,13 +78,15 @@ class ProductInfo extends GISJsonSerialised {
|
||||||
this.productname = otherinfo.productname
|
this.productname = otherinfo.productname
|
||||||
this.subcomponentname = otherinfo.subcomponentname
|
this.subcomponentname = otherinfo.subcomponentname
|
||||||
this.variant = otherinfo.variant
|
this.variant = otherinfo.variant
|
||||||
|
this.uniqueid = otherinfo.uniqueid
|
||||||
}
|
}
|
||||||
|
|
||||||
void deserialiseJson(rawmeta) {
|
void deserialiseJson(rawmeta) {
|
||||||
//format = rawmeta['format']
|
//format = rawmeta['format']
|
||||||
productname = rawmeta['productname']
|
productname = rawmeta['productname']
|
||||||
subcomponentname = rawmeta['subcomponentname']
|
subcomponentname = rawmeta['subcomponentname']
|
||||||
variant = rawmeta['variant'] ?: ""
|
variant = rawmeta['variant'] ?: ''
|
||||||
|
uniqueid = rawmeta['uniqueid'] ?: uniqueid
|
||||||
}
|
}
|
||||||
|
|
||||||
LinkedHashMap serialisationdata() {
|
LinkedHashMap serialisationdata() {
|
||||||
|
|
@ -91,6 +95,7 @@ class ProductInfo extends GISJsonSerialised {
|
||||||
'productname' : productname,
|
'productname' : productname,
|
||||||
'subcomponentname' : subcomponentname,
|
'subcomponentname' : subcomponentname,
|
||||||
'variant' : variant,
|
'variant' : variant,
|
||||||
|
'uniqueid': uniqueid,
|
||||||
]
|
]
|
||||||
return data
|
return data
|
||||||
}
|
}
|
||||||
|
|
@ -104,7 +109,7 @@ class GitInfo extends GISJsonSerialised {
|
||||||
private String remoteurl
|
private String remoteurl
|
||||||
private String remoteinfo
|
private String remoteinfo
|
||||||
|
|
||||||
GitInfo(script, sourcepath = "", sourcerevision = "", gitrevision = "", remoteurl = "", remoteinfo = "") {
|
GitInfo(script, sourcepath = '', sourcerevision = '', gitrevision = '', remoteurl = '', remoteinfo = '') {
|
||||||
super(script)
|
super(script)
|
||||||
this.format = '0.1'
|
this.format = '0.1'
|
||||||
this.sourcepath = sourcepath
|
this.sourcepath = sourcepath
|
||||||
|
|
@ -204,7 +209,7 @@ class JenkinsBuildInfo extends GISJsonSerialised {
|
||||||
private ArrayList<JenkinsBuildParameter> parameters
|
private ArrayList<JenkinsBuildParameter> parameters
|
||||||
private boolean isfullbuild
|
private boolean isfullbuild
|
||||||
|
|
||||||
JenkinsBuildInfo(script, String buildjobname = "", int buildnumber = 0, String buildmachine = "", String builddate = "", boolean isfullbuild = true) {
|
JenkinsBuildInfo(script, String buildjobname = '', int buildnumber = 0, String buildmachine = '', String builddate = '', boolean isfullbuild = true) {
|
||||||
super(script)
|
super(script)
|
||||||
this.format = '0.1'
|
this.format = '0.1'
|
||||||
this.buildjobname = buildjobname
|
this.buildjobname = buildjobname
|
||||||
|
|
@ -370,7 +375,7 @@ class ReleaseInfo extends GISJsonSerialised {
|
||||||
private ArrayList<String> releaseitems
|
private ArrayList<String> releaseitems
|
||||||
private boolean released
|
private boolean released
|
||||||
|
|
||||||
ReleaseInfo(script, String releaserepoURL = "", boolean released = false) {
|
ReleaseInfo(script, String releaserepoURL = '', boolean released = false) {
|
||||||
super(script)
|
super(script)
|
||||||
this.format = '0.1'
|
this.format = '0.1'
|
||||||
this.releaserepoURL = releaserepoURL
|
this.releaserepoURL = releaserepoURL
|
||||||
|
|
@ -378,7 +383,7 @@ class ReleaseInfo extends GISJsonSerialised {
|
||||||
this.released = released
|
this.released = released
|
||||||
}
|
}
|
||||||
|
|
||||||
void set(String releaserepoURL = "") {
|
void set(String releaserepoURL = '') {
|
||||||
this.releaserepoURL = releaserepoURL
|
this.releaserepoURL = releaserepoURL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -426,7 +431,7 @@ class ConfigurationInfo extends GISJsonSerialised {
|
||||||
private String configurationversion
|
private String configurationversion
|
||||||
private String configurationSHA
|
private String configurationSHA
|
||||||
|
|
||||||
ConfigurationInfo(script, configurationname = "", configurationURL = "", configurationversion = "", configurationSHA = "") {
|
ConfigurationInfo(script, configurationname = '', configurationURL = '', configurationversion = '', configurationSHA = '') {
|
||||||
super(script)
|
super(script)
|
||||||
this.configurationname = configurationname
|
this.configurationname = configurationname
|
||||||
this.configurationURL = configurationURL
|
this.configurationURL = configurationURL
|
||||||
|
|
@ -456,7 +461,7 @@ class ChecksumPair extends GISJsonSerialised {
|
||||||
private String filepath
|
private String filepath
|
||||||
private String sum
|
private String sum
|
||||||
|
|
||||||
ChecksumPair(script, String filepath = "", String sum = "") {
|
ChecksumPair(script, String filepath = '', String sum = '') {
|
||||||
super(script)
|
super(script)
|
||||||
this.filepath = filepath
|
this.filepath = filepath
|
||||||
this.sum = sum
|
this.sum = sum
|
||||||
|
|
@ -481,7 +486,7 @@ class ChecksumSet extends GISJsonSerialised {
|
||||||
private String artifactpath
|
private String artifactpath
|
||||||
private ArrayList<ChecksumPair> checksumpairs
|
private ArrayList<ChecksumPair> checksumpairs
|
||||||
|
|
||||||
ChecksumSet(script, artifactpath = "") {
|
ChecksumSet(script, artifactpath = '') {
|
||||||
super(script)
|
super(script)
|
||||||
this.format = '0.1'
|
this.format = '0.1'
|
||||||
this.artifactpath = artifactpath
|
this.artifactpath = artifactpath
|
||||||
|
|
@ -566,7 +571,7 @@ class PublishableInfo extends GISJsonSerialised {
|
||||||
private String format
|
private String format
|
||||||
private String filepath
|
private String filepath
|
||||||
|
|
||||||
PublishableInfo(script, String filepath = "") {
|
PublishableInfo(script, String filepath = '') {
|
||||||
super(script)
|
super(script)
|
||||||
this.format = '0.1'
|
this.format = '0.1'
|
||||||
this.filepath = filepath
|
this.filepath = filepath
|
||||||
|
|
@ -613,7 +618,7 @@ class MetaInfo extends GISJsonSerialised {
|
||||||
private MetaInfo meta
|
private MetaInfo meta
|
||||||
private String offsetpath
|
private String offsetpath
|
||||||
|
|
||||||
RelatedMetaInfo_v0_1(script, offsetpath = "", MetaInfo meta = null) {
|
RelatedMetaInfo_v0_1(script, offsetpath = '', MetaInfo meta = null) {
|
||||||
super(script, '0.1')
|
super(script, '0.1')
|
||||||
this.offsetpath = offsetpath
|
this.offsetpath = offsetpath
|
||||||
this.meta = meta
|
this.meta = meta
|
||||||
|
|
@ -639,7 +644,7 @@ class MetaInfo extends GISJsonSerialised {
|
||||||
private String importpath
|
private String importpath
|
||||||
private String offsetpath
|
private String offsetpath
|
||||||
|
|
||||||
RelatedMetaInfo_v0_2(script, importpath = "", offsetpath = "") {
|
RelatedMetaInfo_v0_2(script, importpath = '', offsetpath = '') {
|
||||||
super(script, '0.2')
|
super(script, '0.2')
|
||||||
this.importpath = importpath
|
this.importpath = importpath
|
||||||
this.offsetpath = offsetpath
|
this.offsetpath = offsetpath
|
||||||
|
|
@ -1106,13 +1111,13 @@ MetaInfo metareset(script) {
|
||||||
return mi
|
return mi
|
||||||
}
|
}
|
||||||
|
|
||||||
MetaInfo metafromfolder(String folder = "") {
|
MetaInfo metafromfolder(String folder = '') {
|
||||||
MetaInfo buildmeta = new MetaInfo(this)
|
MetaInfo buildmeta = new MetaInfo(this)
|
||||||
buildmeta.deserialiseJson("${folder}/${MetaInfo.metafilepath()}")
|
buildmeta.deserialiseJson("${folder}/${MetaInfo.metafilepath()}")
|
||||||
return buildmeta
|
return buildmeta
|
||||||
}
|
}
|
||||||
|
|
||||||
MetaInfo metafromfolderSlurper(String folder = "") {
|
MetaInfo metafromfolderSlurper(String folder = '') {
|
||||||
MetaInfo buildmeta = new MetaInfo(this)
|
MetaInfo buildmeta = new MetaInfo(this)
|
||||||
buildmeta.deserialiseJsonSlurper("${folder}/${MetaInfo.metafilepath()}")
|
buildmeta.deserialiseJsonSlurper("${folder}/${MetaInfo.metafilepath()}")
|
||||||
return buildmeta
|
return buildmeta
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue