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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -