• Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • p4-plugin
    • None

      For the Github plugin, there is a "Build when a change is pushed to GitHub" option (https://wiki.jenkins-ci.org/display/JENKINS/Github+Plugin) as well as for CVS a "post commit trigger" howto. (https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project#Buildingasoftwareproject-UsingapostcommittriggerinCVS)

      An option for the perforce plugin would be nice.
      A build trigger... Something like "Build when a change is pushed to depot"

          [JENKINS-25249] Post-commit hook for P4 plugin

          I did some work on this to make it work with Pipeline: https://github.com/Dohbedoh/p4-plugin/commit/8602fddd4e1ebb45e45e8ed886b4fa9eccc2deed

          I am gonna enrich this with tests and submit a PR as soon as possible.

          Allan BURDAJEWICZ added a comment - I did some work on this to make it work with Pipeline: https://github.com/Dohbedoh/p4-plugin/commit/8602fddd4e1ebb45e45e8ed886b4fa9eccc2deed I am gonna enrich this with tests and submit a PR as soon as possible.

          Kevin Sim added a comment -

          Hi Paul, Alan, does the build filter 'polling per change' works with this new p4 hook?

          Kevin Sim added a comment - Hi Paul, Alan, does the build filter 'polling per change' works with this new p4 hook?

          Kevin Sim added a comment -

          Is variable P4_CHANGELIST exposed to pipeline jobs? I tried ${env.P4_CHANGELIST} in jenkinsfile but its not working.

          Kevin Sim added a comment - Is variable P4_CHANGELIST exposed to pipeline jobs? I tried ${env.P4_CHANGELIST} in jenkinsfile but its not working.

          Paul Allen added a comment -

          The 'polling per change' should work with the new P4 Trigger feature; if you find an issue please open a New JIRA Issue.

          The Workflow --> Pipeline changes are under way and are intended to support the environment.

          Paul Allen added a comment - The 'polling per change' should work with the new P4 Trigger feature; if you find an issue please open a New JIRA Issue. The Workflow --> Pipeline changes are under way and are intended to support the environment.

          Michael Rose added a comment -

          p4paul: It would be nice if there was a way to get the changelist that was sync'd by the p4sync operation. It could populate the P4_CHANGELIST variable like it used to, but users would have to be aware that the variable only represents the most recent sync operation. Another possibility would be for p4sync to just return the changelist it used for the sync.

          Michael Rose added a comment - p4paul : It would be nice if there was a way to get the changelist that was sync'd by the p4sync operation. It could populate the P4_CHANGELIST variable like it used to, but users would have to be aware that the variable only represents the most recent sync operation. Another possibility would be for p4sync to just return the changelist it used for the sync.

          Code changed in jenkins
          User: Allan Burdajewicz
          Path:
          src/main/java/org/jenkinsci/plugins/p4/trigger/P4Trigger.java
          src/test/java/org/jenkinsci/plugins/p4/client/ConnectionTest.java
          http://jenkins-ci.org/commit/p4-plugin/2c179882189200b39d92fddf6f335e1694c2781d
          Log:
          JENKINS-25249: Fixed trigger probe method for pipeline compatibility.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Allan Burdajewicz Path: src/main/java/org/jenkinsci/plugins/p4/trigger/P4Trigger.java src/test/java/org/jenkinsci/plugins/p4/client/ConnectionTest.java http://jenkins-ci.org/commit/p4-plugin/2c179882189200b39d92fddf6f335e1694c2781d Log: JENKINS-25249 : Fixed trigger probe method for pipeline compatibility.

          Code changed in jenkins
          User: Allan Burdajewicz
          Path:
          src/test/java/org/jenkinsci/plugins/p4/client/ConnectionTest.java
          http://jenkins-ci.org/commit/p4-plugin/459dcebc4f83bc2b114b2f6e8bcb18382eea02f2
          Log:
          JENKINS-25249: Added tests for P4 Trigger and Workflow

          Compare: https://github.com/jenkinsci/p4-plugin/compare/2c1798821892^...459dcebc4f83

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Allan Burdajewicz Path: src/test/java/org/jenkinsci/plugins/p4/client/ConnectionTest.java http://jenkins-ci.org/commit/p4-plugin/459dcebc4f83bc2b114b2f6e8bcb18382eea02f2 Log: JENKINS-25249 : Added tests for P4 Trigger and Workflow Compare: https://github.com/jenkinsci/p4-plugin/compare/2c1798821892 ^...459dcebc4f83

          Code changed in jenkins
          User: Paul Allen
          Path:
          src/main/java/org/jenkinsci/plugins/p4/trigger/P4Trigger.java
          src/test/java/org/jenkinsci/plugins/p4/client/ConnectionTest.java
          http://jenkins-ci.org/commit/p4-plugin/e9a370b5ec856951e944086392962592696e67ee
          Log:
          Merge pull request #24 from Dohbedoh/JENKINS-25249

          Jenkins 25249

          Compare: https://github.com/jenkinsci/p4-plugin/compare/8a358595926e...e9a370b5ec85

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Paul Allen Path: src/main/java/org/jenkinsci/plugins/p4/trigger/P4Trigger.java src/test/java/org/jenkinsci/plugins/p4/client/ConnectionTest.java http://jenkins-ci.org/commit/p4-plugin/e9a370b5ec856951e944086392962592696e67ee Log: Merge pull request #24 from Dohbedoh/ JENKINS-25249 Jenkins 25249 Compare: https://github.com/jenkinsci/p4-plugin/compare/8a358595926e...e9a370b5ec85

          Code changed in jenkins
          User: Allan Burdajewicz
          Path:
          src/main/java/org/jenkinsci/plugins/p4/trigger/P4Hook.java
          src/main/java/org/jenkinsci/plugins/p4/trigger/P4Trigger.java
          http://jenkins-ci.org/commit/p4-plugin/d6a42f514e3e7c2b66a2eda04e4f706702c9faeb
          Log:
          JENKINS-25249: Fixed Null Pointer dereference

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Allan Burdajewicz Path: src/main/java/org/jenkinsci/plugins/p4/trigger/P4Hook.java src/main/java/org/jenkinsci/plugins/p4/trigger/P4Trigger.java http://jenkins-ci.org/commit/p4-plugin/d6a42f514e3e7c2b66a2eda04e4f706702c9faeb Log: JENKINS-25249 : Fixed Null Pointer dereference

          Code changed in jenkins
          User: Paul Allen
          Path:
          src/main/java/org/jenkinsci/plugins/p4/trigger/P4Hook.java
          src/main/java/org/jenkinsci/plugins/p4/trigger/P4Trigger.java
          http://jenkins-ci.org/commit/p4-plugin/c9f91403eb60f93ea5d9da3dc22716e84c6bad23
          Log:
          Merge pull request #26 from Dohbedoh/hotfix/JENKINS-25249

          JENKINS-25249: Fixed Null Pointer dereference

          Compare: https://github.com/jenkinsci/p4-plugin/compare/df32b4ec5814...c9f91403eb60

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Paul Allen Path: src/main/java/org/jenkinsci/plugins/p4/trigger/P4Hook.java src/main/java/org/jenkinsci/plugins/p4/trigger/P4Trigger.java http://jenkins-ci.org/commit/p4-plugin/c9f91403eb60f93ea5d9da3dc22716e84c6bad23 Log: Merge pull request #26 from Dohbedoh/hotfix/ JENKINS-25249 JENKINS-25249 : Fixed Null Pointer dereference Compare: https://github.com/jenkinsci/p4-plugin/compare/df32b4ec5814...c9f91403eb60

            p4paul Paul Allen
            swolk swolk
            Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: