Details

    • Similar Issues:

      Description

      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,

        Attachments

          Activity

          Hide
          p4karl Karl Wirth added a comment - - edited

          Hi Hokwang Lee,

          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. 

          Show
          p4karl Karl Wirth added a comment - - edited Hi Hokwang Lee , 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. 
          Hide
          luckyhorang Hokwang Lee added a comment - - edited

          Karl Wirth,

          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?

           

           

           

           

          Show
          luckyhorang Hokwang Lee added a comment - - edited Karl Wirth , 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?        

            People

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

              Dates

              • Created:
                Updated:
                Resolved: