Merge commit '3567488f00'
This commit is contained in:
commit
1747739882
4 changed files with 56 additions and 11 deletions
|
|
@ -662,17 +662,36 @@ class MetaInfo extends GISJsonSerialised {
|
|||
return productinfo.productname + "_" + productinfo.subcomponentname
|
||||
}
|
||||
|
||||
String componentversionuniqueidentifier() {
|
||||
return productinfo.productname + "_" + productinfo.subcomponentname + "_" + buildstampinfo.buildstamp
|
||||
}
|
||||
|
||||
Map<String, RelatedMetaInfo> releasewalkerunique(int maxdepth, String startpath = "") {
|
||||
Map<String, RelatedMetaInfo> releasemetauniquecollection = new LinkedHashMap<String, RelatedMetaInfo>()
|
||||
ArrayList<RelatedMetaInfo> releasemetacollection = new ArrayList<RelatedMetaInfo>()
|
||||
def ArrayList<RelatedMetaInfo> releasemetacollection = new ArrayList<RelatedMetaInfo>()
|
||||
releasemetacollection = releasewalkerp(maxdepth, releasemetacollection, startpath)
|
||||
|
||||
def Map<String, RelatedMetaInfo> releasemetauniquecollection = new LinkedHashMap<String, RelatedMetaInfo>()
|
||||
for (relatedmetainfo in releasemetacollection) {
|
||||
String uniquestring = relatedmetainfo.meta.componentidentifier()
|
||||
def String uniquestring = relatedmetainfo.meta.componentidentifier()
|
||||
releasemetauniquecollection.put(uniquestring, relatedmetainfo)
|
||||
}
|
||||
|
||||
return releasemetauniquecollection
|
||||
}
|
||||
|
||||
Map<String, RelatedMetaInfo> releasewalkerversionunique(int maxdepth, String startpath = "") {
|
||||
ArrayList<RelatedMetaInfo> releasemetacollection = new ArrayList<RelatedMetaInfo>()
|
||||
releasemetacollection = releasewalkerp(maxdepth, releasemetacollection, startpath)
|
||||
|
||||
def Map<String, RelatedMetaInfo> releasemetaversionuniquecollection = new LinkedHashMap<String, RelatedMetaInfo>()
|
||||
for (relatedmetainfo in releasemetacollection) {
|
||||
def String uniquestring = relatedmetainfo.meta.componentversionuniqueidentifier()
|
||||
releasemetaversionuniquecollection.put(uniquestring, relatedmetainfo)
|
||||
}
|
||||
|
||||
return releasemetaversionuniquecollection
|
||||
}
|
||||
|
||||
MetaInfo getNewMetaObject(script) {
|
||||
return new MetaInfo(script)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,12 +107,18 @@ def publishhierarchy(releasemeta, String customer, String softwarerelease, Strin
|
|||
resetfolders()
|
||||
preconditions()
|
||||
|
||||
// Walk the meta information to a max depth, looking for artifacts to import for release
|
||||
componentReleaseInfo = releasemeta.releasewalkerunique(md)
|
||||
// Walk the meta information to a max depth, looking for artifacts to publish
|
||||
def componentReleaseInfoVersionUnique = releasemeta.releasewalkerversionunique(md)
|
||||
|
||||
// For each component
|
||||
for (key in componentReleaseInfo.keySet()) {
|
||||
def releaseinfo = componentReleaseInfo[key]
|
||||
echo "Version unique components:"
|
||||
def String versionuniquecomponent = ""
|
||||
for (key in componentReleaseInfoVersionUnique.keySet()) {
|
||||
versionuniquecomponent += "${key}\n"
|
||||
}
|
||||
echo versionuniquecomponent
|
||||
|
||||
for (key in componentReleaseInfoVersionUnique.keySet()) {
|
||||
def releaseinfo = componentReleaseInfoVersionUnique[key]
|
||||
recallcomponent(releaseinfo, softwarerelease)
|
||||
}
|
||||
stripgithistory()
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ pipeline {
|
|||
steps {
|
||||
script {
|
||||
def publisher = load("${autobuilder.commonscripts()}/publish/do.groovy")
|
||||
MAX_META_DEPTH='2'
|
||||
(summarystring, markunstable, unstablereason) = publisher.publishhierarchy(releasemeta, CUSTOMER, SOFTWARE_RELEASE, MAX_META_DEPTH)
|
||||
if (markunstable) {
|
||||
env.unstablereason = unstablereason
|
||||
|
|
|
|||
|
|
@ -338,8 +338,29 @@ def releasehierarchy(buildmeta, String maxdepth, String otherreleasetags, String
|
|||
resetfolders()
|
||||
preconditions()
|
||||
|
||||
// Walk the meta information to a max depth, looking for artifacts to import for release
|
||||
componentReleaseInfo = buildmeta.releasewalkerunique(md)
|
||||
// Walk the meta information to a max depth, looking for components to release
|
||||
def componentReleaseInfo = buildmeta.releasewalkerunique(md)
|
||||
echo "Unique components:"
|
||||
def String versioncomponent = ""
|
||||
for (key in componentReleaseInfo.keySet()) {
|
||||
versioncomponent += "${key}\n"
|
||||
}
|
||||
echo versioncomponent
|
||||
|
||||
// Walk the meta information to a max depth, looking for components to release
|
||||
def componentReleaseInfoVersionUnique = buildmeta.releasewalkerversionunique(md)
|
||||
echo "Version unique components:"
|
||||
def String versionuniquecomponent = ""
|
||||
for (key in componentReleaseInfoVersionUnique.keySet()) {
|
||||
versionuniquecomponent += "${key}\n"
|
||||
}
|
||||
echo versionuniquecomponent
|
||||
|
||||
if (DO_INTEGRITY_CHECK == "true") {
|
||||
if (componentReleaseInfo.size() != componentReleaseInfoVersionUnique.size()) {
|
||||
error "There are 2 or more versions of the same component being used in this hierarchy: Is this correct?"
|
||||
}
|
||||
}
|
||||
|
||||
def toplevelid = buildmeta.componentidentifier()
|
||||
// For each component
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue