I want to configure the Jenkins in such a way that it should run based on Poll SCM(whenever there is a change) and also every Night Periodically (At 10:00). I want to set only one job for this task.is it possible?
Is it Possible to run Periodic build as CLEAN_BUILD and Poll SCM build Not as a CLEAN_BUILD (On same job).?
Asked
Active
Viewed 529 times
1

mayur usdad
- 11
- 3
-
what version of jenkins are you using? on jenkins 2.7 at least the configure page has check boxes for build triggers, so you can simply check both boxes – Austin_Anderson Jul 26 '17 at 13:36
-
HI, Thank you for the suggestion, I am able to run it with Poll as well as Periodically now. Is there any suggestion for Question 2 ? – mayur usdad Jul 27 '17 at 05:04
-
since the periodic build only runs at 10, you could have a build step that runs a shell script with something like (psuedo code) `if(
== 10 pm ){manually clean build}` – Austin_Anderson Jul 27 '17 at 13:33 -
Thank you for your response @Austin_Anderson but i do not have a knowledge on Pseudo code. I am using the batch scripts which will be called from Jenkins based on poll SCM, do we get any environmental variable from Jenkins similar to
? – mayur usdad Sep 08 '17 at 06:06