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

Perforce plugin does not recognize override of the jenkins workspace separator (default "@")

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Jenkins allows the user to override the separator used when concurrent builds need more than one workspace. By default, the separator is "@", but this can be changed on the jenkins command line with:
      -Dhudson.slaves.WorkspaceList=<some string>

      This part of the plugin code is the culprit:
      private String getConcurrentClientName(FilePath workspace, String p4Client) {
      if (workspace != null) {
      // Match @ followed by an integer at the end of the workspace path
      Pattern p = Pattern.compile(".*@(
      d+)$"); <<<<<<<<<<<<<<<<<<<<<< @ is hard coded, but this separator can be changed by the user
      Matcher matcher = p.matcher(workspace.getRemote());
      if (matcher.find())

      { p4Client += "_" + matcher.group(1); }

      }
      return p4Client;
      }

        Attachments

          Activity

          Hide
          rpetti Rob Petti added a comment -

          I believe this was hardcoded because the version of Hudson (yes, Hudson) we compile against had this hardcoded, and could not be changed by the user at the time.

          Show
          rpetti Rob Petti added a comment - I believe this was hardcoded because the version of Hudson (yes, Hudson) we compile against had this hardcoded, and could not be changed by the user at the time.
          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/775ae4ebc21b2b9f3cb5fdc71660f51925fd5445
          Log:
          [FIXED JENKINS-19519] support overrideable workspace separator

          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/775ae4ebc21b2b9f3cb5fdc71660f51925fd5445 Log: [FIXED JENKINS-19519] support overrideable workspace separator
          Hide
          ajbarber Andrew Barber added a comment -

          Is there a way to get this packaged into the plugin format or a way to patch my copy of the plugin so I can try it out?

          Show
          ajbarber Andrew Barber added a comment - Is there a way to get this packaged into the plugin format or a way to patch my copy of the plugin so I can try it out?
          Show
          rpetti Rob Petti added a comment - http://files.robpetti.com/perforce-plugin/target/perforce.hpi
          Hide
          ajbarber Andrew Barber added a comment -

          Thanks Rob, I tried setting the separator to "__" and it looks like it is working so far.

          Show
          ajbarber Andrew Barber added a comment - Thanks Rob, I tried setting the separator to "__" and it looks like it is working so far.

            People

            • Assignee:
              rpetti Rob Petti
              Reporter:
              ajbarber Andrew Barber
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: