Hi,

I have multi branch pipeline that scans SVN repository for Jenkinsfile. 
 The build jobs are created with names as

foo/bar/somemodule/projectA
foo/bar/somemodule/projectB

Jenkins configures the workspace for the jobs as

${WORKSPACE_ROOT}/${PIPELINE_NAME}/foo%2Fbar%2Fsomemodule%2FprojectA

${WORKSPACE_ROOT}/${PIPELINE_NAME}/foo%2Fbar%2Fsomemodule%2FprojectB

This creates a problem for the build as maven encodes %2F again %252F while 
accessing a file from build target directory.


I tried setting the JOB_NAME to BRANCH_NAME in the Jenkinsfile



env.JOB_NAME = env.BRANCH_NAME.substring(env.BRANCH_NAME.lastIndexOf("/")+1)
echo  "JOB NAME is ${env.JOB_NAME}"


This did not help.

Is there a way to set the build job's name , not just display name, so that 
I can have the workspace directory as

${WORKSPACE_ROOT}/${PIPELINE_NAME}/foo_bar_somemodule_projectA 


Thanks

-Suresh

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/88912795-7146-4b2d-885a-0a6f2da1f10b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to