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-12101] Post-commit hook for Perforce plugin

          Ignacio Llamas added a comment - - edited

          Assigning to one of the Perforce plugin maintainers to ask a question.

          Perforce already has a trigger mechanism, all that needs to be done is add support for that on Jenkins, similar to that in the Subversion and Git plugins: https://wiki.jenkins-ci.org/display/JENKINS/Subversion+Plugin

          Something like this I imagine would be executed in the perforce trigger script:
          /usr/bin/wget \
          --header "Content-Type:text/plain;charset=UTF-8" \
          --post-data "$CHANGELIST $P4_PATH`" \
          -output-document "" \
          --timeout=2 \
          http://server/perforce/notifyCommit?rev=$REV

          Is there any other way of doing this already?

          (Polling the repository seems like a suboptimal solution. Can miss changelists, and has to be done quite frequently)

          Ignacio Llamas added a comment - - edited Assigning to one of the Perforce plugin maintainers to ask a question. Perforce already has a trigger mechanism, all that needs to be done is add support for that on Jenkins, similar to that in the Subversion and Git plugins: https://wiki.jenkins-ci.org/display/JENKINS/Subversion+Plugin Something like this I imagine would be executed in the perforce trigger script: /usr/bin/wget \ --header "Content-Type:text/plain;charset=UTF-8" \ --post-data "$CHANGELIST $P4_PATH`" \ - output-document " " \ --timeout=2 \ http://server/perforce/notifyCommit?rev=$REV Is there any other way of doing this already? (Polling the repository seems like a suboptimal solution. Can miss changelists, and has to be done quite frequently)

          Rob Petti added a comment -

          You can create a polling script that will trigger the correct builds by examining the changes. There is not yet a 'notifyCommit' interface to simplify this process, hence the need for this ticket.

          Rob Petti added a comment - You can create a polling script that will trigger the correct builds by examining the changes. There is not yet a 'notifyCommit' interface to simplify this process, hence the need for this ticket.

          Thanks.

          Do you mean something like what is described in the last post in http://stackoverflow.com/questions/16435315/jenkins-perforce-plugin-multiple-changelists-in-a-single-poll ?

          Or do you perhaps have an example polling script that does what you suggest?

          Ignacio Llamas added a comment - Thanks. Do you mean something like what is described in the last post in http://stackoverflow.com/questions/16435315/jenkins-perforce-plugin-multiple-changelists-in-a-single-poll ? Or do you perhaps have an example polling script that does what you suggest?

          Rob Petti added a comment -

          Sorry, I meant to type trigger script, not polling script. They are two different things entirely.

          It depends on what you intend. That stack overflow question is specifically about running a build per change list, not necessarily about a post commit trigger as this ticket describes.

          In the case of this ticket, you would need to write a post commit trigger in perforce that analyzes each change, and kicks off the associated builds using the Jenkins REST api or CLI. As I mentioned, the script will need to do the heavy lifting, since there's no "notifyCommit" interface yet, which is what this ticket is for.

          Rob Petti added a comment - Sorry, I meant to type trigger script, not polling script. They are two different things entirely. It depends on what you intend. That stack overflow question is specifically about running a build per change list, not necessarily about a post commit trigger as this ticket describes. In the case of this ticket, you would need to write a post commit trigger in perforce that analyzes each change, and kicks off the associated builds using the Jenkins REST api or CLI. As I mentioned, the script will need to do the heavy lifting, since there's no "notifyCommit" interface yet, which is what this ticket is for.

          As a "Perforce triggered build" is possible: why not close this ticket?

          Heiko Nardmann added a comment - As a "Perforce triggered build" is possible: why not close this ticket?

            Unassigned Unassigned
            deye Deger Yentur
            Votes:
            5 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: