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


env.job_name pipeline name suffixed branch name.

so env.job_name <jenkins_pipeline_name>_<my_branch>

how can pipeline name , store in var in environment{} block @ top of jenkinsfile use through file?

i don't want resort scripted pipeline declarative.

since using multibranch job, env variable returning actual job name created out of branch .i.e. _ .. so, without mechanism strip/sed out branch name, don't think there env variable in jenkins out-of-the-box.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -