DEV Community

Discussion on: Jenkins Pipelines and their dirty secrets 3.

Collapse
 
pencillr profile image
Richard Lenkovits

Hi, thank you. I don't know of any way that would get you the name of the stages before the stages run, in the Jenkinsfile. Although you could do several things to have the stage names beforehand.
First, you could instantiate a list with the names of the stages at the beginning, and you could reference the elements of it at the stage declaration.

Collapse
 
yooofeng profile image
YangFeng

Thanks for your reply. I think I understand what you mean, a parameters{} block or a input method is feasible.