• Icon: Task Task
    • Resolution: Not A Defect
    • Icon: Critical Critical
    • p4-plugin

      Hi,

       

      I want to make jenkins pipeline job

      to run whenever commit comes.

       

      In checkout code, there's filter: [incremental(true)] feature like below.

      checkout perforce(
          credential: 'p4',
          filter: [incremental(true)],
          populate: syncOnly(...),
          workspace: templateSpec(...)
      )
      

      What is this for? 

       

      and there's polling build filters options in configuration page.

      What is this for?

      What is different with upper code ?

       

      Many thanks,

          [JENKINS-58456] explain polling per change

          Hokwang Lee created issue -
          Karl Wirth made changes -
          Attachment New: image-2019-07-12-08-35-27-798.png [ 47984 ]

          Karl Wirth added a comment - - edited

          Hi luckyhorang,

          Yes if you check the Pipeline Syntax snippet generator that checkbox controls incremental (true):

          This is described in:

            https://www.perforce.com/manuals/jenkins/Content/P4Jenkins/chapter-polling-build-filters.html?Highlight=poll%20per

           

                    Polling per Change: A build is carried out for every change that is submitted. The polling event will only return the oldest

                     unbuilt change, resulting in incremental builds.

           

          Therefore when enabled you should see:

           

          CL 1 submitted.
          
          5 minute poll builds CL1
          
          CL2 submitted
          
          CL3 submitted
          
          5 minute poll builds CL2
          
          CL4 submitted
          
          5 minute poll builds CL3
          

          As you can see for every change to be built the polling has to occur more frequently than the submits.

           

          If you really want on demand builds for every changelist a 'change-submit' Perforce trigger that explicitly calls the Jenkins job URL passing the changelist as a parameter is the recommended mechanism. 

          Karl Wirth added a comment - - edited Hi luckyhorang , Yes if you check the Pipeline Syntax snippet generator that checkbox controls incremental (true): This is described in:   https://www.perforce.com/manuals/jenkins/Content/P4Jenkins/chapter-polling-build-filters.html?Highlight=poll%20per             Polling per Change: A build is carried out for every change that is submitted. The polling event will only return the oldest            unbuilt change, resulting in incremental builds.   Therefore when enabled you should see:   CL 1 submitted. 5 minute poll builds CL1 CL2 submitted CL3 submitted 5 minute poll builds CL2 CL4 submitted 5 minute poll builds CL3 As you can see for every change to be built the polling has to occur more frequently than the submits.   If you really want on demand builds for every changelist a 'change-submit' Perforce trigger that explicitly calls the Jenkins job URL passing the changelist as a parameter is the recommended mechanism. 
          Karl Wirth made changes -
          Assignee New: Karl Wirth [ p4karl ]
          Karl Wirth made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Karl Wirth made changes -
          Labels New: P4_SUPPORT
          Karl Wirth made changes -
          Attachment New: image-2019-09-02-16-25-39-289.png [ 48571 ]
          Karl Wirth made changes -
          Attachment New: image-2019-09-02-16-25-59-683.png [ 48572 ]
          Karl Wirth made changes -
          Attachment New: image-2019-09-02-16-26-19-383.png [ 48573 ]
          Karl Wirth made changes -
          Attachment New: image-2019-09-02-16-26-46-699.png [ 48574 ]

            p4karl Karl Wirth
            luckyhorang Hokwang Lee
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: