Question
env.JOB_NAME Is the pipeline name suffixed with the branch name. (Check Using Environment Variables)
So env.JOB_NAME will be
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.
How-To
According to Global Variable Reference, we have:
which can give you the name of pipeline.
沒有留言:
張貼留言