This is a known incompatibility between workflow and email-ext. Email-ext expects projects to be based on AbstractProject and Workflow is not.
On Wed, Jul 29, 2015 at 6:23 AM David Resnick <abune...@gmail.com> wrote: > I have a freestyle job that fails to run the post-build extended email > step when it is triggered by a workflow buildJob construct. > > The error message: > > ERROR: Could not send email as a part of the post-build publishers. > java.lang.ClassCastException: > org.jenkinsci.plugins.workflow.job.WorkflowJob cannot be cast to > hudson.model.AbstractProject > at > hudson.plugins.emailext.plugins.recipients.UpstreamComitterRecipientProvider.addRecipients(UpstreamComitterRecipientProvider.java:40) > at > hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:578) > at > hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:306) > at > hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:297) > at > hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:244) > at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) > at > hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761) > at > hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721) > at hudson.model.Build$BuildExecution.cleanUp(Build.java:193) > at hudson.model.Run.execute(Run.java:1788) > at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) > at hudson.model.ResourceController.execute(ResourceController.java:98) > at hudson.model.Executor.run(Executor.java:374) > > It seems that it might be able to succeed if I remove some of the > categories I chose to send to, though I have not yet experimented with this. > > Is there a known workaround for this problem? Would it be helpful for me > to open a bug for this? > > Thanks, > David > > -- > 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. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/cbf83da3-943d-4a91-a8e2-8dd389175c20%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/cbf83da3-943d-4a91-a8e2-8dd389175c20%40googlegroups.com?utm_medium=email&utm_source=footer> > . > 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. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVea-T3kg31PgvBv94XGcfoNmv5qMeF3fxS5Z9xS709g3A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.