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

Perforce plugin loses configuration for System Root

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: perforce-plugin
    • Labels:
      None
    • Environment:
      Windows master and slaves, with perforce SCM
    • Similar Issues:

      Description

      1. Create a test job.
      2. Set it up with Perforce for the SCM.
      3. In the Advanced section, set the Windows System Drive and System Root to empty strings.
      4. Save the config.
      5. Re-open the configuration window.
      6. Note that the empty strings have been replaced with C: and C:\Windows
      7. Set the Windows System Root and System Drive to strings of a single space.
      8. Save the config.
      9. Re-open the configuration window.
      10. Note that the single space strings have been replaced with empty strings
      11. Save the config again, and it's back to the C: based defaults

      According to JENKINS-4908, empty strings should mean that the perforce plugin should just get the data from the environment.

      As we have some slaves where the system drive is C: and some where it's D: (don't ask...) we need to rely on the empty string configuration. Unfortunately, anyone who changes the job configuration needs to also change these fields to single spaces so they will be saved correctly (as empty strings). Otherwise, there will be arbitrary failures when a D: based slave is next chosen for a build.

      I've patched the source to make it behave as I would expect and tested locally - will attach...

        Attachments

          Issue Links

            Activity

            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
            src/test/java/hudson/plugins/perforce/PerforceSCMTest.java
            http://jenkins-ci.org/commit/perforce-plugin/a807f5ea3c7c3afa6b234c8c55a3513d35c82026
            Log:
            [FIXED JENKINS-15348] applying patch provided in ticket

            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 src/test/java/hudson/plugins/perforce/PerforceSCMTest.java http://jenkins-ci.org/commit/perforce-plugin/a807f5ea3c7c3afa6b234c8c55a3513d35c82026 Log: [FIXED JENKINS-15348] applying patch provided in ticket

              People

              • Assignee:
                rpetti Rob Petti
                Reporter:
                wol Simon Howkins
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: