-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
-
Blue Ocean - Candidates
Problem
For some steps, such as notifications, it is pretty common to want to be able to get to pipeline variables (as opposed to environment variables).
In pipeline text this generally means you use double quotes, and string interpolation in the parameters, howrever the editor uses single quotes and avoids groovy string expansion.
It would be nice to be able to allow dynamic double quoted strings as an option somehow.
Steps to reproduce
- Use a notification step - try to get the pipeline name into the message string
- Use an environment variable, try to use "credentials('abc')" to fetch the cred value (it will only be literally what you type in)
Out of scope:
- A UI to select available pipeline variables
kzantow to do it at execution time would mean changing declarative - so that it always does an extra pass on literal strings (vs double quoted) right? Potentially risky...
I see now you can refer to env variables the same way if they are double quoted or single (however if it is missing a var and it is double quoted, you get a stack trace, vs an empty variable..)
abayer looking for inspiration here: how do we know, or ask the user, the intent to use double or single quoted strings in declarative? if you had to tell people to use one by default, what would you say?