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

Perforce plugin should replace variables from matrix configuration

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • p4-plugin
    • None
    • Linux, Perforce

      It would be nice to be able to build software from different branches using matrix configuration.

      I would like to have a parameter in the client view map, like this:

      //mib2_com/${BRANCH}/sqlite3/... //WRK/sqlite3/...

      and this should be replaced with the actual branch, e.g. "dev/main", "rel/2014", ...

      Master Job checkout behaviour:
      As there is currently no way to omit the checkout in the Master Matrix Job, the first value of the axes should be used.

      As we're doing a lot of branches in our company, I would appreciate this behaviour a lot! This would make our configuration so much more light weight

      Thanks in advance,
      Christian

          [JENKINS-23599] Perforce plugin should replace variables from matrix configuration

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/plugins/perforce/utils/MacroStringHelper.java
          http://jenkins-ci.org/commit/perforce-plugin/a35f1fe507ac86a08f857fe0e03a36d658a66138
          Log:
          [FIXED JENKINS-23599] - Substitute Matrix Axis values in PerforceSCM

          Behavior:

          • MatrixConfiguration: Inject Values
          • MatrixProject: Inject the first value or empty string if it is not available

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

          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/a35f1fe507ac86a08f857fe0e03a36d658a66138 Log: [FIXED JENKINS-23599] - Substitute Matrix Axis values in PerforceSCM Behavior: MatrixConfiguration: Inject Values MatrixProject: Inject the first value or empty string if it is not available Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          Oleg Nenashev added a comment -

          Master Job checkout behaviour:
          As there is currently no way to omit the checkout in the Master Matrix Job, the first value of the axes should be used.

          SCMCheckoutStrategy allows to implement such feature.
          Implementation: https://wiki.jenkins-ci.org/display/JENKINS/Extension+points#Extensionpoints-jenkins.scm.SCMCheckoutStrategy
          AFAIK, there was an issue for the new strategy implementation

          Commit in Perforce: https://github.com/jenkinsci/perforce-plugin/commit/a35f1fe507ac86a08f857fe0e03a36d658a66138

          Oleg Nenashev added a comment - Master Job checkout behaviour: As there is currently no way to omit the checkout in the Master Matrix Job, the first value of the axes should be used. SCMCheckoutStrategy allows to implement such feature. Implementation: https://wiki.jenkins-ci.org/display/JENKINS/Extension+points#Extensionpoints-jenkins.scm.SCMCheckoutStrategy AFAIK, there was an issue for the new strategy implementation Commit in Perforce: https://github.com/jenkinsci/perforce-plugin/commit/a35f1fe507ac86a08f857fe0e03a36d658a66138

          krizleebear added a comment -

          I tested CloudBees build #126 and it works like a charm! Thanks for this extremely useful improvement! So now I'm really looking forward to the official release!

          krizleebear added a comment - I tested CloudBees build #126 and it works like a charm! Thanks for this extremely useful improvement! So now I'm really looking forward to the official release!

          krizleebear added a comment -

          After two more months, there is still no release containing this fix
          Will there be ever a new release of Perforce plugin? There hasn't been a release since Januar (https://github.com/jenkinsci/perforce-plugin/releases).

          I've also seen that there's a completely new perforce plugin (https://github.com/jenkinsci/p4-plugin) that's in active development.

          krizleebear added a comment - After two more months, there is still no release containing this fix Will there be ever a new release of Perforce plugin? There hasn't been a release since Januar ( https://github.com/jenkinsci/perforce-plugin/releases ). I've also seen that there's a completely new perforce plugin ( https://github.com/jenkinsci/p4-plugin ) that's in active development.

          krizleebear added a comment -

          Thanks a lot! The new version of Perforce plugin released in November includes this issue and it works like a charm!

          Unfortunately there's a subsequent problem with encoding slash characters in Jenkins core (or matrix plugin?) that should have been fixed a few years ago. I reopened this issue: https://issues.jenkins-ci.org/browse/JENKINS-2670
          Is there anything else I can do to help this problem getting fixed?

          krizleebear added a comment - Thanks a lot! The new version of Perforce plugin released in November includes this issue and it works like a charm! Unfortunately there's a subsequent problem with encoding slash characters in Jenkins core (or matrix plugin?) that should have been fixed a few years ago. I reopened this issue: https://issues.jenkins-ci.org/browse/JENKINS-2670 Is there anything else I can do to help this problem getting fixed?

          Oleg Nenashev added a comment -

          Please do not re-open cases without an analysis.
          JENKINS-25599 overs your case.
          Hopefully, the new plugin version will be released on this week.

          P.S: If you experience any issue, please feel free to contribute. There's no 24/7 maintainers of this plugin

          Oleg Nenashev added a comment - Please do not re-open cases without an analysis. JENKINS-25599 overs your case. Hopefully, the new plugin version will be released on this week. P.S: If you experience any issue, please feel free to contribute. There's no 24/7 maintainers of this plugin

            oleg_nenashev Oleg Nenashev
            krizleebear krizleebear
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: