GIS-1621 - Use script prompting to obtain publishing info from user

This commit is contained in:
Dan Hawkins 2019-09-15 19:43:01 +01:00
commit 6c0bd77749
2 changed files with 11 additions and 4 deletions

View file

@ -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: [

View file

@ -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