How to use Jenkins Pipeline and choose triggers for email notifications? Before Pipeline, I used Email-ext plugin to define triggers for sending emails (on first failure, and when back to success).

But in the Pipeline version, I can't control the triggers, I can only "send always", or send based on current build result.

How do I send emails in pipeline based on more general triggers? (first failure, first success, etc)
This seems not to be possible at the moment with pipelines. See this Jira ticket.