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

Perforce 'View Map from File' field does not perform parameter substitution

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • p4-plugin
    • Jenkins 1.542
      Perforce Plugin 1.3.26

      In my project's Source Code Management : Perforce : Project Details : Client View Type field, parameter substitution works in the View Map field, but it does not work in the View Map from File file.

      For example:

      1) In your Jenkins project, create a String Parameter VERSION and set it to the string 6.2
      2) In the View Map field, utilize this parameter, such as

      //depot/myapp/version_{$VERSION}/client/...
      

      Observation: This expands correctly as expected

      3) Switch to View Map from File, and enter this parameter:

      //depot/myapp/version_{$VERSION}/myapp_build_mapping.txt
      

      Observation: {$VERSION} is not expanded prior to use, resulting in the following warning:

      Warning: Client Spec line invalid, ignoring. (//depot/myapp/version_{$VERSION}/myapp_build_mapping.txt - no such file(s).)
      

      Workaround: Use a build mapping file that is at a fixed depot path

      Notes: It would be nice if parameter expansion could happen on this before it is used. That way, I can specify a project-specific build mapping. This is useful for working on multiple versions of an application in parallel using feature branches, so that the 6.2 feature team can check in a change to this mapping, and when the 6.2 changes merge into the main codeline, the 6.3 team's mapping will be updated when they do a catch-up from main.

            rpetti Rob Petti
            jishaq Jeff Ishaq
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: