Configuring the Jenkins polling interval to: * * * * *
will poll the SCM for every minute.
Is there a way to configure it to poll less than a minute? for example every 30 seconds?
Poll SCM periodically polls the SCM to check whether changes were made (i.e. new commits) and builds the project if new commits where pushed since the last build, whereas build periodically builds the project periodically even if nothing has changed.
Follow the steps as mentioned below to trigger a Jenkins job automatically based on GitHub's webhook configurations: Step 1: Go to the Configuration page of the respective job and under the build trigger section, check the "GitHub hook trigger for GITScm polling" checkbox and click on the Save button.
Polling. If you configure the Poll SCM trigger in the Pipeline's UI configuration screen, then by default Jenkins will also poll for changes according to the selected Schedule, and schedule new builds automatically if changes are detected.
Jenkins uses Cron syntax for polling. Not sure you can get to 30 seconds since Cron has a 60 sec granularity.
Check out this: How to get a unix script to run every 15 seconds?
Get your SCM to trigger the build instead of polling for it.
What SCM are you using?
Edit:
You can tell Jenkins to wait 'x' seconds after the check in change before starting the build. I have the same issue, dev's doing multiple check ins.
There are two options to configure this, a system wide option or a per-job option.
The system wide option is under Manage -> Configure System -> Quiet Period. It is in seconds.
The per job option is under Advanced Project Options, and is also called Quiet Period.
If you set quiet period to 90, Jenkins will wait until 90 seconds after the last detected check in before starting the build.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With