Merge commit '7fb8ecb7e0e28ce1e6715a7b2899f83b6a3491e1'

This commit is contained in:
Dan Hawkins 2021-12-29 13:12:11 +00:00
commit 8034fe092e
5 changed files with 16 additions and 11 deletions

View file

@ -140,14 +140,14 @@ def convertitemstopublish(String itemstopublishstring) {
// Publish selected items from a release to the customer folder on the ftp site // Publish selected items from a release to the customer folder on the ftp site
// itemstopublishstring is a comma-seperated set of strings in this format <ProductName>#<ComponentName>#<PathToPublishableItem> // itemstopublishstring is a comma-seperated set of strings in this format <ProductName>#<ComponentName>#<PathToPublishableItem>
def publishhierarchy(hostedftpsiteinfo, releasemeta, String itemstopublishstring, String customer, String softwarerelease, String maxdepth) { def publishhierarchy(hostedftpsiteinfo, releasemeta, String releasemetapath, String itemstopublishstring, String customer, String softwarerelease, String maxdepth) {
int md = maxdepth.toInteger() int md = maxdepth.toInteger()
resetfolders() resetfolders()
preconditions() preconditions()
def productline = releasemeta.productinfo.productname def productline = releasemeta.productinfo.productname
// Walk the meta information to a max depth, looking for artifacts to publish // Walk the meta information to a max depth, looking for artifacts to publish
def componentReleaseInfoVersionUnique = releasemeta.releasewalkerversionunique(md) def componentReleaseInfoVersionUnique = releasemeta.releasewalkerversionunique(md, '', releasemetapath)
echo "Version unique components:" echo "Version unique components:"
def String versionuniquecomponent = "" def String versionuniquecomponent = ""
@ -167,8 +167,8 @@ def publishhierarchy(hostedftpsiteinfo, releasemeta, String itemstopublishstring
return [summarystring, markunstable, unstablereason] return [summarystring, markunstable, unstablereason]
} }
def publishhierarchy(hostedftpsiteinfo, releasemeta, String customer, String softwarerelease, String maxdepth) { def publishhierarchy(hostedftpsiteinfo, releasemeta, String releasemetapath, String customer, String softwarerelease, String maxdepth) {
return publishhierarchy(hostedftpsiteinfo, releasemeta, "", customer, softwarerelease, maxdepth) return publishhierarchy(hostedftpsiteinfo, releasemeta, releasemetapath, '', customer, softwarerelease, maxdepth)
} }
return this; return this;

View file

@ -114,6 +114,7 @@ pipeline {
'Select software items', 'Select software items',
'Software items', 'Software items',
releasemeta, releasemeta,
SOURCEDIR,
ITEMSDEFAULTLIST, ITEMSDEFAULTLIST,
MAX_META_DEPTH, MAX_META_DEPTH,
'20', '20',
@ -135,7 +136,7 @@ pipeline {
script { script {
def publisher = load("${autobuilder.commonscripts()}/publish/do.groovy") def publisher = load("${autobuilder.commonscripts()}/publish/do.groovy")
def hostedftpsiteinfo = hostedftb.getHostedFTPSiteInfo() def hostedftpsiteinfo = hostedftb.getHostedFTPSiteInfo()
(summarystring, markunstable, unstablereason) = publisher.publishhierarchy(hostedftpsiteinfo, releasemeta, selecteditems, customer, release, MAX_META_DEPTH) (summarystring, markunstable, unstablereason) = publisher.publishhierarchy(hostedftpsiteinfo, releasemeta, SOURCEDIR, selecteditems, customer, release, MAX_META_DEPTH)
if (markunstable) { if (markunstable) {
env.unstablereason = unstablereason env.unstablereason = unstablereason
currentBuild.result = 'UNSTABLE' currentBuild.result = 'UNSTABLE'

View file

@ -18,6 +18,7 @@ class PublishableItemsSelection {
String name, String name,
String description, String description,
releasemeta, releasemeta,
String releasemetapath,
String preselectedext, String preselectedext,
String metalevelsstringext, String metalevelsstringext,
String visibleItemCountExt, String visibleItemCountExt,
@ -25,7 +26,7 @@ class PublishableItemsSelection {
outputSelectionfromPreselect(preselectedmenuitems, preselectedext) outputSelectionfromPreselect(preselectedmenuitems, preselectedext)
def Integer metalevelsext = metalevelsstringext.toInteger() def Integer metalevelsext = metalevelsstringext.toInteger()
def Integer visibleItemCount = visibleItemCountExt.toInteger() def Integer visibleItemCount = visibleItemCountExt.toInteger()
def metaitems = releasemeta.releasewalkerunique(metalevelsext) def metaitems = releasemeta.releasewalkerunique(metalevelsext, '', releasemetapath)
for (key in metaitems.keySet()) { for (key in metaitems.keySet()) {
def releaseinfo = metaitems[key] def releaseinfo = metaitems[key]
outputDescription(menuitemdescriptions, releaseinfo) outputDescription(menuitemdescriptions, releaseinfo)
@ -113,13 +114,14 @@ PublishableItemsSelection createItemSelector(
String name, String name,
String description, String description,
releasemeta, releasemeta,
String releasemetapath,
String preselectedext, String preselectedext,
String metalevelsstringext, String metalevelsstringext,
String visibleItemCountExt = '20', String visibleItemCountExt = '20',
String type = 'PT_CHECKBOX') { // Could also be "PT_MULTI_SELECT" String type = 'PT_CHECKBOX') { // Could also be "PT_MULTI_SELECT"
PublishableItemsSelection pis = new PublishableItemsSelection(this) PublishableItemsSelection pis = new PublishableItemsSelection(this)
pis.init(name, description, releasemeta, preselectedext, metalevelsstringext, visibleItemCountExt, type) pis.init(name, description, releasemeta, releasemetapath, preselectedext, metalevelsstringext, visibleItemCountExt, type)
return pis return pis
} }

View file

@ -441,8 +441,10 @@ def releasehierarchy(String buildfolder, String metafolder, buildmeta, String ma
// For each component // For each component
for (key in componentReleaseInfo.keySet()) { for (key in componentReleaseInfo.keySet()) {
def buildinfo = componentReleaseInfo[key] def buildinfo = componentReleaseInfo[key]
if (toplevelid != key) { if (buildinfo.metainfo.componentidentifier() != '___') {
releasecomponent(buildmeta, buildinfo, otherreleasetags, dryrunpush) if (toplevelid != key) {
releasecomponent(buildmeta, buildinfo, otherreleasetags, dryrunpush)
}
} }
} }
// Do the top level last // Do the top level last

View file

@ -195,8 +195,8 @@ def docheckout(String gitURL, String revision, int cloneDepth, String reporootpa
[name: revision] [name: revision]
], ],
extensions: [ extensions: [
[$class: 'GitLFSPull',timeout: 25], [$class: 'GitLFSPull'],
[$class: 'CleanBeforeCheckout',timeout: 20], [$class: 'CleanBeforeCheckout'],
[$class: 'CloneOption', depth: cloneDepth, noTags: false, reference: reporootpath, shallow: shallowClone, timeout: 120], [$class: 'CloneOption', depth: cloneDepth, noTags: false, reference: reporootpath, shallow: shallowClone, timeout: 120],
[$class: 'CheckoutOption', timeout: 120], [$class: 'CheckoutOption', timeout: 120],
[$class: 'RelativeTargetDirectory', relativeTargetDir: targetDir], [$class: 'RelativeTargetDirectory', relativeTargetDir: targetDir],