Condition to perform a night build ONLY if there was committed something to SCM during the day

398 views
Skip to first unread message

Pavel Kudrys

unread,
Apr 22, 2014, 3:28:51 AM4/22/14
to jenkins...@googlegroups.com
Hi folks,

Does anyone have an idea what kind of condition should I create in the Conditional BuildStep Plugin to perform a night build only if there was committed something to SCM during the day? In other words, I just want to perform a night build ONLY in case there was previously performed (during the day) a "Poll SCM changes" based build.

At the moment, our jobs are configured to perform "DAILY" builds based of polling SMC changes and the time scheduled "NIGHTLY" builds, which are performed regardless if there was committed something in the SCM. I would like to change that.

Is that possible with the Conditional BuildStep Plugin or should I use different plugin for this?

Thank you in advance!

Have a nice day,
Pavel Kudrys

Ginga, Dick

unread,
Apr 22, 2014, 8:39:56 AM4/22/14
to jenkins...@googlegroups.com

Just use the Poll SCM and set it for something like “H 20 * * *” to poll nightly at 10 PM

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pavel Kudrys

unread,
Apr 24, 2014, 2:02:37 AM4/24/14
to jenkins...@googlegroups.com

Hi,

Thanks for the suggestion!

The problem is, I already use poll SCM schedule for daily builds (with smoke test). So if I add your suggested timing to the existing daily schedule, would not it just pass without building anything at night?

I mean, during the day, there may be several commits from the developers. And after each commit, build & smoke test is started based of the existing "daily" poll scm schedule (poll every 15 minutes from Mon-Fri). Now if I add your suggested timing, nothing will happen when the "night build" time is reached, because there will be nothing new in the SCM from the last daily build. Or am I wrong?

See the attached image showing our current build schedule setup. All I want to do is to skip the night build & full test in (rare) case when there is nothing new committed to the SCM during the day. And always perform the night build & full test, in case there was something committed.   

Thank you in advance!

Have a nice day,
Pavel

BuildTriggers.png

Richard Bywater

unread,
Apr 24, 2014, 2:26:22 AM4/24/14
to jenkins...@googlegroups.com
Perhaps the best bet might be to have two jobs - one for the smoke test that you have polling already, and a new one that does the full test and has the polling as suggested?

Richard.
Reply all
Reply to author
Forward
0 new messages