1
votes

In a Jenkins build I created two "Active Choices Reactive Reference Parameter" (input text boxes) those are PARAMETER1 and PARAMETER2. I can use contains() call in PARAMETER2's groovy script as below

PARAMETER1.contains("some string")

but I could not find a way to read PARAMTER1's exact value.

I am very new ing groovy and do not have understanding of Java.

How can I set use PARAMETER1 to a string in PARAMETER2's groovy script?

1

1 Answers

0
votes

The PARAMETER1 variable gets injected into your PARAMETER2 Groovy script, as a variable.

It means that you can call it just like a normal variable. For example.

return [PARAMETER1+'ou', PARAMETER1+'AA', PARAMETER1+'11', ]

That will return the value of PARAMETER1 concatenated with some other string.

Hope that helps, Bruno