Skip to content

Instantly share code, notes, and snippets.

@sergebug
Created March 20, 2015 20:23
Show Gist options
  • Save sergebug/b837749ba5d082148466 to your computer and use it in GitHub Desktop.
Save sergebug/b837749ba5d082148466 to your computer and use it in GitHub Desktop.
// If list of causes is not empty, then cancel email
// Will NOT sent email notification by Jenkins email-ext plugin when job was executed by another upstream job.
// The idea is to avoid multiple notifications from both upstream and downstream jobs.
try {
if (build.getCauses.size()>0) {
cancel = true
}
} catch(e) {
cancel = true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment