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

P4 Counter text field does not do env variable subsitution

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Currently the P4 counter text field does not expand env variables when run.

      Steps to reproduce:
      1) Setup a build job
      2) Enable Perforce plugin
      3) In the P4 Counter text field, enter a counter name with env varaible, example: counter_${JOB_NAME}
      4) Start the build

      Result:
      The perforce plugin saves the synced chagnelist to counter_${JOB_NAME} instead of substituting it when creating a counter name. Env substitution would be useful in here as I can set this once and use it in different jobs.

      I have actually re-compiled the latest 1.3.8-snapshot with changes to support env variables substitution. It was a one line change...what would be best method to publish my work? (Sorry this is my first time contributing

        Attachments

          Activity

          Hide
          rpetti Rob Petti added a comment -

          You can send a pull request on github, or even attach it here, whichever is easiest for you.

          Show
          rpetti Rob Petti added a comment - You can send a pull request on github, or even attach it here, whichever is easiest for you.
          Hide
          wokuku Andy Tang added a comment -

          line change: 667

          counterName = substituteParameters(this.p4Counter, build);

          Show
          wokuku Andy Tang added a comment - line change: 667 counterName = substituteParameters(this.p4Counter, build);
          Hide
          wokuku Andy Tang added a comment -

          I have attached the file. Basically I changed line 667 to set counterName to call substituteParameters(this.p4Counter, build) instead of setting it to p4Counter.

          Show
          wokuku Andy Tang added a comment - I have attached the file. Basically I changed line 667 to set counterName to call substituteParameters(this.p4Counter, build) instead of setting it to p4Counter.
          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
          http://jenkins-ci.org/commit/perforce-plugin/1617ca1b0b98fa3ec33f22f29fb0d04b4e82af9e
          Log:
          [FIXED JENKINS-12755] committing Andy Tang's patch to add counter name substitution

          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 http://jenkins-ci.org/commit/perforce-plugin/1617ca1b0b98fa3ec33f22f29fb0d04b4e82af9e Log: [FIXED JENKINS-12755] committing Andy Tang's patch to add counter name substitution
          Hide
          dogfood dogfood added a comment -

          Integrated in plugins_perforce #177
          [FIXED JENKINS-12755] committing Andy Tang's patch to add counter name substitution (Revision 1617ca1b0b98fa3ec33f22f29fb0d04b4e82af9e)

          Result = SUCCESS
          Rob Petti :
          Files :

          • src/main/java/hudson/plugins/perforce/PerforceSCM.java
          Show
          dogfood dogfood added a comment - Integrated in plugins_perforce #177 [FIXED JENKINS-12755] committing Andy Tang's patch to add counter name substitution (Revision 1617ca1b0b98fa3ec33f22f29fb0d04b4e82af9e) Result = SUCCESS Rob Petti : Files : src/main/java/hudson/plugins/perforce/PerforceSCM.java

            People

            • Assignee:
              Unassigned
              Reporter:
              wokuku Andy Tang
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: