GIS-1621 - Alter how hostedftpsite object is passed around - surtsey2 is crashing

This commit is contained in:
Dan Hawkins 2019-09-15 22:56:43 +01:00
commit 60c68622cd
3 changed files with 10 additions and 10 deletions

View file

@ -1,7 +1,5 @@
import groovy.io.FileType
hostedftb = load("${autobuilder.commonscripts()}/remoteaccess/hostedftp.groovy")
markunstable = false
unstablereason = ""
@ -87,10 +85,9 @@ def getcomponentartifacts(releaseinfo, String repofolder, itempathstopublish) {
}
}
def publish(String customer, String finalreleaserepofolder = releaserepofolder) {
def publish(hostedftpsiteinfo, String customer, String finalreleaserepofolder = releaserepofolder) {
summaryappend(" FTP operations: ")
def hostedftpsiteinfo = hostedftb.getHostedFTPSiteInfo()
def String ftproot = "${hostedftpsiteinfo.workingdirectory}${customer}"
dir(finalreleaserepofolder) {
summaryappend("FTP operations: Transferring to ${ftproot}")
@ -143,7 +140,7 @@ def convertitemstopublish(String itemstopublishstring) {
// 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>
def publishhierarchy(releasemeta, String itemstopublishstring, String customer, String softwarerelease, String maxdepth) {
def publishhierarchy(hostedftpsiteinfo, releasemeta, String itemstopublishstring, String customer, String softwarerelease, String maxdepth) {
int md = maxdepth.toInteger()
resetfolders()
preconditions()
@ -165,13 +162,13 @@ def publishhierarchy(releasemeta, String itemstopublishstring, String customer,
recallcomponent(productline, releaseinfo, softwarerelease, itempathstopublish)
}
gh.stripgithistory(releaserepofolder)
publish(customer)
publish(hostedftpsiteinfo, customer)
return [summarystring, markunstable, unstablereason]
}
def publishhierarchy(releasemeta, String customer, String softwarerelease, String maxdepth) {
return publishhierarchy(releasemeta, "", customer, softwarerelease, maxdepth)
def publishhierarchy(hostedftpsiteinfo, releasemeta, String customer, String softwarerelease, String maxdepth) {
return publishhierarchy(hostedftpsiteinfo, releasemeta, "", customer, softwarerelease, maxdepth)
}
return this;

View file

@ -112,7 +112,8 @@ pipeline {
steps {
script {
def publisher = load("${autobuilder.commonscripts()}/publish/do.groovy")
(summarystring, markunstable, unstablereason) = publisher.publishhierarchy(releasemeta, selecteditems, customer, release, MAX_META_DEPTH)
def hostedftpsiteinfo = hostedftb.getHostedFTPSiteInfo()
(summarystring, markunstable, unstablereason) = publisher.publishhierarchy(hostedftpsiteinfo, releasemeta, selecteditems, customer, release, MAX_META_DEPTH)
if (markunstable) {
env.unstablereason = unstablereason
currentBuild.result = 'UNSTABLE'

View file

@ -44,7 +44,9 @@ pipeline {
steps {
script {
def publisher = load("${autobuilder.commonscripts()}/publish/do.groovy")
(summarystring, markunstable, unstablereason) = publisher.publishhierarchy(releasemeta, ITEMS_TO_PUBLISH, CUSTOMER, SOFTWARE_RELEASE, MAX_META_DEPTH)
def hostedftb = load("${autobuilder.commonscripts()}/remoteaccess/hostedftp.groovy")
def hostedftpsiteinfo = hostedftb.getHostedFTPSiteInfo()
(summarystring, markunstable, unstablereason) = publisher.publishhierarchy(hostedftpsiteinfo, releasemeta, ITEMS_TO_PUBLISH, CUSTOMER, SOFTWARE_RELEASE, MAX_META_DEPTH)
if (markunstable) {
env.unstablereason = unstablereason
currentBuild.result = 'UNSTABLE'