Can I nest an email notification step inside of a build step?

9 views
Skip to first unread message

jis...@gmail.com

unread,
Aug 7, 2014, 4:27:19 PM8/7/14
to jenkins...@googlegroups.com
Hello,

I would like to add multiple build steps that:
  - Run a bash (or ruby or whatever) script
  - If script returns failure, perform custom email behavior based on that script's output
  - The email, and the distribution list, are customized for this specific build step.

For example, a hypothetical Jenkins project setup:

Build
   Execute Shell
      * Main part where we build and produce a binary

   Execute Ruby Script #1
      * Run a script that validates some aspect of the built binary
      E-mail Notification
         * Send out an email if the Ruby script in this Execute Ruby Script task returned failure

   Execute shell
      * Run a script that validates some other aspect of the built binary
      E-mail Notification
         * Send out an email IF the shell script in this Execute Shell task returned failure
    
So is there any way to 'nest' an Email action inside of a single 'Execute Shell' or 'Execute Ruby Script' build step?  If not, each step's script has to implement its own email handling, and that's not something I was hoping to re-invent (but is not the end of the world).

Thanks very much for your time!

Slide

unread,
Aug 7, 2014, 9:16:36 PM8/7/14
to Jenkins User Mailing List
The Any Build Step plugin [1] might do what you want. I am not sure if you can conditionally do stuff based on other build step results, but it may be possible since it uses the Conditional Build Step plugin.

slide



--
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.



--
Website: http://earl-of-code.com

Jeff Ishaq

unread,
Aug 29, 2014, 6:55:22 PM8/29/14
to jenkins...@googlegroups.com
A belated thank-you for the suggestion to look into Any Build Step!


--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/LpDiBrNjy5A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages