Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-58639

pipeline job runs every two minutes

    Details

    • Similar Issues:

      Description

      Hi,

       

      I use pipeline job. (not multibranch)

      The config of this job is,

       

      1. Build Triggers > Poll SCM checked, Schedule */2 * * * *
      2. Pipeline > Definition : Pipeline script from SCM, SCM : Perforce Software, Polling build filters : Polling per Change Enabled checked

       

      I think jenkins job runs well usally, but sometimes this problem occurs.

      You can see job created every two minutes.

       

      In this case, #114 shows one CL 2921937

      and also #115 shows same CL 2921937

      actually  up to #140 all runs shows same CL.

       

      I do not know why this happened, I found that it could be a clue.

      Two CLs are submitted very closely.

       

      Please check this situation.

       

      Edited:

      Several Polling Log :

        Attachments

          Activity

          Hide
          p4karl Karl Wirth added a comment -

          Hi Hokwang Lee. Please get us the Polling Log from two runs of the job showing that it polled once per minute.

           

          Please also get us the Jenkinsfile.

          Show
          p4karl Karl Wirth added a comment - Hi Hokwang Lee . Please get us the Polling Log from two runs of the job showing that it polled once per minute.   Please also get us the Jenkinsfile.
          Hide
          luckyhorang Hokwang Lee added a comment -

          Karl Wirth I will update description and I will send Jenkinsfile to email.

          Show
          luckyhorang Hokwang Lee added a comment - Karl Wirth I will update description and I will send Jenkinsfile to email.
          Hide
          luckyhorang Hokwang Lee added a comment -

          Karl Wirth Any comments?

          Show
          luckyhorang Hokwang Lee added a comment - Karl Wirth Any comments?
          Hide
          p4karl Karl Wirth added a comment -

          Hi Hokwang Lee - I'm now back from vacation and have some more questions so will email you directly.

          Show
          p4karl Karl Wirth added a comment - Hi Hokwang Lee - I'm now back from vacation and have some more questions so will email you directly.
          Hide
          p4karl Karl Wirth added a comment - - edited

          Believe I have reproduced this. Reproduction steps:

          (1) Create a workspace in ws

          (2) Create files in "/ws/JENKINS-58639"

          (3) Created "/ws/JENKINS-58639/Jenkinsfile":

          pipeline {
            options {
                  skipDefaultCheckout()
            }  agent { label 'docker-slave' }  stages {
              stage("Sync") {
                steps {
                   script{
                       checkout perforce(credential: 'JenkinsMaster', filter: [incremental(true)], populate: syncOnly(force: false, have: true, modtime: false, parallel: [enable: false, minb
          ytes: '1024', minfiles: '1', threads: '4'], pin: '', quiet: true, revert: false), workspace: templateSpec(charset: 'none', format: 'jenkins-${NODE_NAME}-${JOB_NAME}-src', pinHost: 
          false, templateName: "JENKINS-58639-template"))
                }
               }
              }
              stage ("wait_prior_starting_smoke_testing") {
                   steps {
                    echo 'Waiting 20 seconds'
                    sleep 30
                    }
                  }
              stage("Test") {
                steps {
                    sh 'ls'
                }
              }
            }
          }
          

          (4) Create a job with

          (5) Set quiet period to 5 (not so important).

          (6) Build job once.

          (7) Submit a file to '/ws/JENKINS-58639'.

          (8) Add a trigger to perforce to slow down syncs. For example create script "sleep.sh":

          echo Sleeping for 600s in trigger...
          sleep 600
          

          make the file executable, then create a trigger entry:

          	trigger.sleep.1 command pre-user-sync ./sleep.sh
          

          (9) Run Poll now. Job will wait 5 seconds then start building.

          (10) Submit another changelist to '/ws/JENKINS-58639'.

          (11) Wait 20 seconds run Poll now. Job will wait 5 seconds then start building.

          (12) Wait 20 seconds run Poll now. Job will wait 5 seconds then start building.

          (13) Wait 20 seconds run Poll now. Job will wait 5 seconds then start building.

          (14) Wait 20 seconds run Poll now. Job will wait 5 seconds then start building.

          Show
          p4karl Karl Wirth added a comment - - edited Believe I have reproduced this. Reproduction steps: (1) Create a workspace in ws (2) Create files in "/ws/ JENKINS-58639 " (3) Created "/ws/ JENKINS-58639 /Jenkinsfile": pipeline { options { skipDefaultCheckout() } agent { label 'docker-slave' } stages { stage( "Sync" ) { steps { script{ checkout perforce(credential: 'JenkinsMaster' , filter: [incremental( true )], populate: syncOnly(force: false , have: true , modtime: false , parallel: [enable: false , minb ytes: '1024' , minfiles: '1' , threads: '4' ], pin: '', quiet: true , revert: false ), workspace: templateSpec(charset: ' none ', format: ' jenkins-${NODE_NAME}-${JOB_NAME}-src', pinHost: false , templateName: "JENKINS-58639-template" )) } } } stage ( "wait_prior_starting_smoke_testing" ) { steps { echo 'Waiting 20 seconds' sleep 30 } } stage( "Test" ) { steps { sh 'ls' } } } } (4) Create a job with (5) Set quiet period to 5 (not so important). (6) Build job once. (7) Submit a file to '/ws/ JENKINS-58639 '. (8) Add a trigger to perforce to slow down syncs. For example create script "sleep.sh": echo Sleeping for 600s in trigger... sleep 600 make the file executable, then create a trigger entry: trigger.sleep.1 command pre-user-sync ./sleep.sh (9) Run Poll now. Job will wait 5 seconds then start building. (10) Submit another changelist to '/ws/ JENKINS-58639 '. (11) Wait 20 seconds run Poll now. Job will wait 5 seconds then start building. (12) Wait 20 seconds run Poll now. Job will wait 5 seconds then start building. (13) Wait 20 seconds run Poll now. Job will wait 5 seconds then start building. (14) Wait 20 seconds run Poll now. Job will wait 5 seconds then start building.
          Hide
          p4karl Karl Wirth added a comment -

          Highlighted to PM.

          Show
          p4karl Karl Wirth added a comment - Highlighted to PM.
          Hide
          p4paul Paul Allen added a comment -

          Released in 1.10.5

          Show
          p4paul Paul Allen added a comment - Released in 1.10.5

            People

            • Assignee:
              cbopardikar Charusheela Bopardikar
              Reporter:
              luckyhorang Hokwang Lee
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: