Jonathan Kuleff I can't duplicate the problem you're reporting. Steps I took trying to duplicate the problem:
- Created a JENKINS-50886 branch in my jenkins-bugs repository so that the job will be created in my multi-branch Pipelines
- Define an ant script that sleeps for MINUTES_TO_WAIT=13 + 30 seconds
- Define a scripted Pipeline in the Jenkinsfile that defines polling interval as MINUTES_TO_WAIT
- Scan the repository to detect the new branch
- Confirm that a single build is run when a change is detected and that no additional builds are run until the next polling interval detects changes
I assumed that the difference between scripted and declarative is not relevant in this case. I assumed that a multi-branch Pipeline was a sufficient approximation for your case. Are you using a Pipeline (without multi-branch) or are you using multi-branch Pipeline? I was able to cause two concurrent builds of the same commit if I used curl to the Jenkins notifyCommit URL shortly after the commit happened. Since you're using polling, I assume you're not using notifyCommit and I assume you're not using webhooks. If you are using notifyCommit or webhooks, then you don't need polling. |