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

parameter expansion not done on depotPath in p4Sync Pipeline DSL

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • p4-plugin
    • None

      If parameterize your build by defining a string variable PARAMETERIZED_VAR with value 'foo', and then use that variable in the p4Sync DSL, a la.

      p4sync <stuff>, depotPath: '//depot/project/${PARAMETERIZED_VAR}', <stuff>

      It appears to attempt to create client spec called //depot/project/PARAMETERIZED_VAR rather than //depot/project/foo

          [JENKINS-37455] parameter expansion not done on depotPath in p4Sync Pipeline DSL

          Richard Lee added a comment -

          This is actually a higher priority than 'minor', and is a regression from the legacy 'perforce' plugin.

          Richard Lee added a comment - This is actually a higher priority than 'minor', and is a regression from the legacy 'perforce' plugin.

          Paul Allen added a comment -

          I have reproduced it, but at this stage not sure how to resolve it. When I expand the variables I call on Jenkins using jenkins.getGlobalNodeProperties() which provides the variables. I can't see why the defaults are not set or how to access them.

          https://github.com/jenkinsci/p4-plugin/blob/master/src/main/java/org/jenkinsci/plugins/p4/workspace/Expand.java

          Paul Allen added a comment - I have reproduced it, but at this stage not sure how to resolve it. When I expand the variables I call on Jenkins using jenkins.getGlobalNodeProperties() which provides the variables. I can't see why the defaults are not set or how to access them. https://github.com/jenkinsci/p4-plugin/blob/master/src/main/java/org/jenkinsci/plugins/p4/workspace/Expand.java

            Unassigned Unassigned
            llamahunter Richard Lee
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: