Maybe you can go about it the other way around. If you haves branch called “r1.0” that you want to protect, don’t let users merge to “r1.0”. Instead, have them merge to “r1.0_candidate”. Put a build job on that, and let it promote from “r1.0_candiate” to “r1.0” if the tests pass.
--Rob From: jenkinsci-users@googlegroups.com [mailto:jenkinsci-users@googlegroups.com] On Behalf Of Sumit Kumar Sent: Monday, July 21, 2014 2:29 AM To: jenkinsci-users@googlegroups.com Subject: Re: Can i revert back the commit in git if the build fails in jenkins or bamboo? Is there any other option available?? Writing hooks/scripts for checking if Build Fails or not in jenkins?? On Friday, July 18, 2014 5:25:07 PM UTC+5:30, Mark Waite wrote: I am not aware of any Jenkins plugin that will revert changes on a failed build. On Jul 18, 2014 5:48 AM, "Sumit Kumar" <sumi...@gmail.com<mailto:sumi...@gmail.com>> wrote: Can we write checks or script to do the revert in GIT, pre commit hooks or do we have any plugin available in jenkins or Bamboo for this? -- 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<mailto:jenkinsci-use...@googlegroups.com>. For more options, visit https://groups.google.com/d/optout. -- 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-users+unsubscr...@googlegroups.com<mailto:jenkinsci-users+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/d/optout. Click here<https://www.mailcontrol.com/sr/7fHdpJqeGWTGX2PQPOmvUmkxeMeR4!FmLShixMFkpqDJ12uG!oUC4RkNRpVuV2sX2PF171VK7gusCq9I+zBdpQ==> 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 jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.