When a job detected by polling fails, it will run again the next time polling runs even when there are no new changes since last poll. For example.
(1) Build works.
(2) No new changes = Next poll no execution.
(3) New change made = Next poll execution.
(4) Build fails = Next poll execution.
(5) Build fails = Next poll execution.
(6) Build works = Next poll no execution.
(1) Create a pipeline job with the following Jenkinsfile and set it up to poll every minutes (or use the PollNow plugin):
(2) Submit a changelist to the polled view.
(3) Wait for job to run, go into the console for the job execution and click on 'Input requested', Untick 'Yes?' then click 'OK'. Job will be marked as 'FAILURE'.
(4) Wait for next poll or click 'Poll Now'. Job will trigger again.
(5) On 'Input requested just click 'OK'. Job will be marked as 'SUCCESS'.
(6) Wait for next poll or click 'Poll Now'. Job will NOT trigger again.