From 3b4d690e14328c006d5c348149e460434383a411 Mon Sep 17 00:00:00 2001 From: ermisw Date: Wed, 4 Oct 2023 12:37:29 +0200 Subject: [PATCH] active choice --- Jenkinsfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9669b0c..99655b5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,11 +1,16 @@ properties([parameters([[$class: 'DynamicReferenceParameter', choiceType: 'ET_FORMATTED_HTML', name: 'General', omitValueField: false, randomName: 'choice-parameter-517572555514769', referencedParameters: '', script: [$class: 'GroovyScript', fallbackScript: [classpath: [], oldScript: '', sandbox: false, script: ''], script: [classpath: [], oldScript: '', sandbox: true, script: ''' -def verCode = UUID.randomUUID().toString() -test="hallo" +def generator = { String alphabet, int n -> + new Random().with { + (1..n).collect { alphabet[ nextInt( alphabet.length() ) ] }.join() + } +} +randomValue = generator( (('A'..'Z')+('0'..'9')+('a'..'z')).join(), 9 ) + vappHtml = """