How do I get the name of the pipeline from inside the jenkinsfile

17 views
Skip to first unread message

red 888

unread,
Aug 17, 2017, 9:46:25 PM8/17/17
to Jenkins Users

env.JOB_NAME Is the pipeline name suffixed with the branch name.


So env.JOB_NAME will be <jenkins_pipeline_name>_<my_branch>


How can I just get the pipeline name and store it in a var in the environment{} block at the top of my jenkinsfile to use through the file?

I don't want to resort to scripted pipeline just the declarative.

Reply all
Reply to author
Forward
0 new messages