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

Perforce Plugin Substitutes default Parameter Value instead of actual Parameter Value for client name

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Assume a project has a parameter called "paramA" with a default value of "defaultValue". Also assume the client name format is set to ${nodename}_${paramA}. If the project is build with the parameter definition "paramA=otherValue" the effective client name resolved will still be <nodename>_defaultValue rather than <nodename>_otherValue as expected. This is because the default project substitutions are made first.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/main/java/hudson/plugins/perforce/utils/MacroStringHelper.java
            http://jenkins-ci.org/commit/perforce-plugin/7b22e0b18e27941d07269d53b63e3720841944e5
            Log:
            [FIXED JENKINS-25226] - Resolve environment variables with a highest priority

            Other variables (projects, default parameters, etc.) will be used in the case of missing macros.
            It should not happen in general, but may appear in buildEnvironment()

            Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/plugins/perforce/utils/MacroStringHelper.java http://jenkins-ci.org/commit/perforce-plugin/7b22e0b18e27941d07269d53b63e3720841944e5 Log: [FIXED JENKINS-25226] - Resolve environment variables with a highest priority Other variables (projects, default parameters, etc.) will be used in the case of missing macros. It should not happen in general, but may appear in buildEnvironment() Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
            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/utils/MacroStringHelper.java
            src/test/java/com/synopsys/arc/jenkinsci/plugins/perforce/MacroStringHelperTest.java
            src/test/java/hudson/plugins/perforce/PerforceSCMTest.java
            http://jenkins-ci.org/commit/perforce-plugin/fe2717138270aa9a927730dfc7b91e1cc9a97495
            Log:
            Merge pull request #59 from synopsys-arc-oss/Variables_handling_issues

            [FIXED JENKINS-25635,JENKINS-25226] - Variables substitution issues

            Compare: https://github.com/jenkinsci/perforce-plugin/compare/44c10b2c639c...fe2717138270

            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/utils/MacroStringHelper.java src/test/java/com/synopsys/arc/jenkinsci/plugins/perforce/MacroStringHelperTest.java src/test/java/hudson/plugins/perforce/PerforceSCMTest.java http://jenkins-ci.org/commit/perforce-plugin/fe2717138270aa9a927730dfc7b91e1cc9a97495 Log: Merge pull request #59 from synopsys-arc-oss/Variables_handling_issues [FIXED JENKINS-25635,JENKINS-25226] - Variables substitution issues Compare: https://github.com/jenkinsci/perforce-plugin/compare/44c10b2c639c...fe2717138270
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Stuart reported that the issue has not been solved for client names.
            Reopening the issue

            Show
            oleg_nenashev Oleg Nenashev added a comment - Stuart reported that the issue has not been solved for client names. Reopening the issue
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Created JENKINS-25559 for Stuart's case

            Show
            oleg_nenashev Oleg Nenashev added a comment - Created JENKINS-25559 for Stuart's case
            Hide
            bscriver Brent Scriver added a comment -

            I have seen this issue in 1.3.29 of the Perforce plugin where the workspace field was set to ${CLIENTSPEC} and the default value for ${CLIENTSPEC} was empty and is populated by incoming parameters from triggering jobs. The client name format for slaves was just ${basename}. 1.3.29 was selecting the default value instead of the incoming value. Downgrading to 1.3.27 addressed my issue.

            Show
            bscriver Brent Scriver added a comment - I have seen this issue in 1.3.29 of the Perforce plugin where the workspace field was set to ${CLIENTSPEC} and the default value for ${CLIENTSPEC} was empty and is populated by incoming parameters from triggering jobs. The client name format for slaves was just ${basename}. 1.3.29 was selecting the default value instead of the incoming value. Downgrading to 1.3.27 addressed my issue.

              People

              • Assignee:
                oleg_nenashev Oleg Nenashev
                Reporter:
                stuartrowe Stuart Rowe
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: