Hello,
Do you know if it is possible, for a declarative jenkins pipeline, to have stage names calculated dynamically, via usage of a variable for example?
I have a pipeline, which initially had stages for prod and stages for dev. Different workers were assigned with static labels. I've changed the label calculation to be a dynamic one with the use of an variable. That allowed me to consolidate the prod and dev stages, so now my pipeline is a lot more clean and duplicate stuff was removed (any differences in the build steps for prod and dev are calculated dynamically in script blocks).
So, the last thing I want to do is to have the stage names prefixed with Prod or Dev, depending on the build type (that come from a variable of course). But all my tries to name the stage like that, results in an error. Is that even possible?
Thanks a lot for any input.
Regards