Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-9893

$JOB_NAME doesn't work with matrix projects due to illegal character '/' in workspace name

XMLWordPrintable

      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.

            rpetti Rob Petti
            abigos Andy Bigos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: