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

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

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          Hide
          rpetti Rob Petti added a comment -

          This has now been implemented.

          Show
          rpetti Rob Petti added a comment - This has now been implemented.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Rob Petti
          Path:
          src/main/java/hudson/plugins/perforce/PerforceSCM.java
          http://jenkins-ci.org/commit/perforce-plugin/2835992394b5d83fc9d2de02c3c1696ecd74cef7
          Log:
          [FIXED JENKINS-9906] adding replacements to JOB_NAME substitution to remove invalid characters

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Rob Petti Path: src/main/java/hudson/plugins/perforce/PerforceSCM.java http://jenkins-ci.org/commit/perforce-plugin/2835992394b5d83fc9d2de02c3c1696ecd74cef7 Log: [FIXED JENKINS-9906] adding replacements to JOB_NAME substitution to remove invalid characters
          Hide
          tfields Thomas Fields added a comment -

          Thank you for fixing this issue. Do you know when the updated Perforce plugin, which contains the fix will be officially available via the Jenkins plugin manager?

          Show
          tfields Thomas Fields added a comment - Thank you for fixing this issue. Do you know when the updated Perforce plugin, which contains the fix will be officially available via the Jenkins plugin manager?
          Hide
          rpetti Rob Petti added a comment -

          Soon. Later this week if not today.

          Show
          rpetti Rob Petti added a comment - Soon. Later this week if not today.

            People

            • Assignee:
              rpetti Rob Petti
              Reporter:
              tfields Thomas Fields
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: