We have a job with "Poll SCM" running on `* * * * *` (every minute). We need to use "Included Regions" so the local polling strategy is used. The build takes about 30 minutes. It correctly ignores changes in the steady state but when a commit comes in, it correctly notices a change saying something like:
and starts the build. But then 1 minute later, it notices the same thing and starts another build. These new builds continue to be started until one of them finishes and then the queueing stops.
I've tried all sorts of combinations to try and get new jobs to not start with the exact same SHA but to no avail. The closest I can get is to let only 1 concurrent build go at a time, but that still leaves 1 job in the queue and we end up double building everything.
Is there a way to have the SCM polling take into account existing builds?