Adding a client workspace spec. like jenkins-$JOB_NAME will cause a P4 error:
xxx $ "C:\Program Files\Perforce\p4.exe" -s client -i Caught exception communicating with perforce. Slashes (/) not allowed in xxxxx
when used in a matrix project. Something like below:
String nameFixer(AbstractProject project) { String name = project.getFullName(); return name.replace('/','-').replace('=','-').replace(',','-'); }
when substituting "JOB_NAME" is a possible fix to create valid workspace name.