From 6c0bd777490004baabfba4f4095282fde619aa05 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sun, 15 Sep 2019 19:43:01 +0100 Subject: [PATCH] GIS-1621 - Use script prompting to obtain publishing info from user --- publish/promptingpublish.groovy | 4 ++-- publish/publishitems.groovy | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/publish/promptingpublish.groovy b/publish/promptingpublish.groovy index 4919116..6186d49 100644 --- a/publish/promptingpublish.groovy +++ b/publish/promptingpublish.groovy @@ -56,7 +56,7 @@ pipeline { message: 'Please select the software version', ok: 'Ok', parameters: [ - choice(name: 'release', choices: releases, description: 'Which release?') + choice(name: 'release', choices: releases, description: 'Which software release?') ] ) echo "Chosen software version is: ${release}" @@ -91,7 +91,7 @@ pipeline { releasemeta, ITEMSDEFAULTLIST, MAX_META_DEPTH) - def selecteditems = input( + selecteditems = input( message: 'Select which items from the release are to be published', ok: 'Ok', parameters: [ diff --git a/publish/publishitems.groovy b/publish/publishitems.groovy index aa14c71..4510554 100644 --- a/publish/publishitems.groovy +++ b/publish/publishitems.groovy @@ -21,7 +21,7 @@ class PublishableItemsSelection { String preselectedext, String metalevelsstringext, String visibleItemCountExt, - String type) { + String controltype) { outputSelectionfromPreselect(preselectedmenuitems, preselectedext) def Integer metalevelsext = metalevelsstringext.toInteger() def Integer visibleItemCount = visibleItemCountExt.toInteger() @@ -32,14 +32,21 @@ class PublishableItemsSelection { outputSelection(menuitemsfull, releaseinfo) } + script.echo("name is: ${name}") + script.echo("description is: ${description}") script.echo("menuitemsfull is: ${menuitemsfull}") script.echo("preselectedmenuitems is: ${preselectedmenuitems}") script.echo("menuitemdescriptions is: ${menuitemdescriptions}") + script.echo("visibleItemCount is: ${visibleItemCount}") + script.echo("controltype is: ${controltype}") + def seperator = "," + visibleItemCount = min(visibleItemCount, menuitemsfull.size()) + script.echo("visibleItemCount is now: ${visibleItemCount}") multiselect = new ExtendedChoiceParameterDefinition( name, // String name - type, // String type + controltype, // String type menuitemsfull.join(seperator), // String value "project name", // String projectName "", // String propertyFile