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

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

    • 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.

          [JENKINS-21721] Perforce 'View Map from File' field does not perform parameter substitution

          Jeff Ishaq created issue -
          Jeff Ishaq made changes -
          Environment Original: Jenkins 1.542
          Perforce Plugin <not sure, probably latest>
          New: Jenkins 1.542
          Perforce Plugin 1.3.26
          Rob Petti made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 153721 ] New: JNJira + In-Review [ 194665 ]
          Jenkins IRC Bot made changes -
          Component/s New: p4-plugin [ 19224 ]
          Component/s Original: perforce-plugin [ 15506 ]

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

              Created:
              Updated:
              Resolved: