I have a project that poll's Git every 5 minutes and builds on changes using the Git plugin in a pipeline job. The issue I'm having is that if the build fails (inside of 5 minutes), the next poll causes another build. I also had a situation where a build started but didn't finish within the 5 minutes (ran for 4 hours without finishing) and so another build was put in the queue, eventually leading to more than 50 jobs in the queue.
Is this expected behavior? I would more expect once a pull is done that the next poll would find no changes and do nothing.
Jenkins v2.19.4
Git plugin v3.0.1