• 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

          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. 

          Hokwang Lee added a comment - - edited

          p4karl,

          Thanks for your reply.

           

          So, if I use 

          filter: [incremental(true)],

          in checkout syntax in Pipeline,

          I don't need to check Polling per Change in Polling build filters. Right?

           

           

           

           

          Hokwang Lee added a comment - - edited p4karl , Thanks for your reply.   So, if I use  filter: [incremental( true )], in checkout syntax in Pipeline, I don't need to check Polling per Change in Polling build filters. Right?        

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

              Created:
              Updated:
              Resolved: