From b85ff94505d339a6f52a81fe5557e6eef93d1e60 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sun, 15 Sep 2019 20:23:04 +0100 Subject: [PATCH] GIS-1621 - The PRODUCT_NAME variable is not necessarily defined --- publish/promptingpublish.groovy | 66 ++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/publish/promptingpublish.groovy b/publish/promptingpublish.groovy index 1683876..843a217 100644 --- a/publish/promptingpublish.groovy +++ b/publish/promptingpublish.groovy @@ -36,14 +36,16 @@ pipeline { script { hostedftb = load("${autobuilder.commonscripts()}/remoteaccess/hostedftp.groovy") def List customers = hostedftb.getCustomerList() - customer = input( - message: 'Please select customer to publish to', - ok: 'Ok', - parameters: [ - choice(name: 'customer', choices: customers, description: 'Which customer?') - ] - ) - echo "Chosen customer is: ${customer}" + timeout(time: 10, unit: 'MINUTES') { + customer = input( + message: 'Please select customer to publish to', + ok: 'Ok', + parameters: [ + choice(name: 'customer', choices: customers, description: 'Which customer?') + ] + ) + echo "Chosen customer is: ${customer}" + } } } } @@ -52,14 +54,16 @@ pipeline { script { gh = load("${autobuilder.commonscripts()}/versioncontrol/git.groovy") def releases = gh.gettaglist(SOURCEDIR) - release = input( - message: 'Please select the software version', - ok: 'Ok', - parameters: [ - choice(name: 'release', choices: releases, description: 'Which software release?') - ] - ) - echo "Chosen software version is: ${release}" + timeout(time: 10, unit: 'MINUTES') { + release = input( + message: 'Please select the software version', + ok: 'Ok', + parameters: [ + choice(name: 'release', choices: releases, description: 'Which software release?') + ] + ) + echo "Chosen software version is: ${release}" + } } } } @@ -85,20 +89,22 @@ pipeline { steps { script { publishitems = load("${autobuilder.commonscripts()}/publish/publishitems.groovy") - def itemsobject = publishitems.createItemSelector( - 'name', //'Select software items', - 'description', //'Print Server software items', - releasemeta, - ITEMSDEFAULTLIST, - MAX_META_DEPTH) - selecteditems = input( - message: 'Select which items from the release are to be published', - ok: 'Ok', - parameters: [ - itemsobject.multiSelect() - ] - ) - echo "Chosen items are: ${selecteditems}" + timeout(time: 10, unit: 'MINUTES') { + def itemsobject = publishitems.createItemSelector( + 'name', //'Select software items', + 'description', //'Print Server software items', + releasemeta, + ITEMSDEFAULTLIST, + MAX_META_DEPTH) + selecteditems = input( + message: 'Select which items from the release are to be published', + ok: 'Ok', + parameters: [ + itemsobject.multiSelect() + ] + ) + echo "Chosen items are: ${selecteditems}" + } } } }