An alternate way of handling this is to stop polling. Or rather, poll explicitly.
Have a job which runs every n minutes/hours and does the following: 1: Pull the latest version 2: Check it against a version file in the workspace (never clean the workspace) 3: If the latest version is the same as what’s in the version file, you succeeded. 4: If the latest version is different, or if there is no version file: A: Use an API call or the Scriptler plugin or something to run a second job that does the actual build. Don’t wait for it to finish. B: Put the new version into the version file C: You succeeded. The job described above can send email on every poll, and the job it calls can send email on every build. --Rob From: [email protected] [mailto:[email protected]] On Behalf Of Jeff Sent: Tuesday, September 22, 2015 4:49 PM To: Jenkins Users Subject: Initiate script/email BEFORE SCM polling I have someone in our development group, who insists on receiving an email, no matter whether there are SCM changes initiating a build, or not (polling at scheduled times throughout the day). They want evidence that the process is running at the scheduled times, whether a build is occurring or not <eyeroll />. The Editable Email Notification plug-in triggers seems to all require that a build has occurred in some fashion. It sounds like there's been discussion on adding options to tie in to the SCM polling itself, but no movement to date. I tried a 'Prepare an environment for run' script, but again, it apparently isn't called unless there are SCM changes. Does anyone know of a trick, to run a script prior to SCM polling? Thanks. -- 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 [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5ad68688-3825-4060-ab18-868726f739fc%40googlegroups.com<https://groups.google.com/d/msgid/jenkinsci-users/5ad68688-3825-4060-ab18-868726f739fc%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. Click here<https://www.mailcontrol.com/sr/j2HskhsxL7!GX2PQPOmvUtVTDJsKpCsgT7zyv7EvEcmKo2N3rKsCBWJ2YfNqpTZcx!GuWTiSPBCMQcgptJ50Pg==> to report this email as spam. ________________________________ This e-mail and the information, including any attachments it contains, are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message. Thank you. Please consider the environment before printing this email. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0A40042D85E7C84DB443060EC44B3FD36DAB2DD344%40dekaexchange07.deka.local. For more options, visit https://groups.google.com/d/optout.
