Question on email extension plugin in a pipeline step

14 views
Skip to first unread message

Mario Jauvin

unread,
Jun 9, 2020, 12:46:14 PM6/9/20
to Jenkins Users
I am trying to use groovy classes found in the pipeline shared library (using @Library annotation on jenkinsfile) inside the presendScript string supplied to the emailext pipeline step.  These classes come from the src folder of the shared library (not the vars folder).  I get 
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1.groovy: 1: unable to resolve class com.company.MyGroovyClass
 @ line 1, column 1.
   import com.company.MyGroovyClass;

Can this be done.  Remember, I do not have access to adding to the freestyle configuration for the editable email notification to add something to the class path.  Any help much appreciated.

Mario

Slide

unread,
Jun 9, 2020, 1:34:54 PM6/9/20
to Jenkins User Mailing List
No, this scenario is not currently supported.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/60aa9cc6-2ed1-4092-bb81-cfd42f40d377o%40googlegroups.com.


--

Mario Jauvin

unread,
Jun 9, 2020, 1:56:11 PM6/9/20
to Jenkins Users
What is the classpath setup at that moment?  What do I have access to?

Slide

unread,
Jun 9, 2020, 2:40:44 PM6/9/20
to Jenkins User Mailing List
You can set the classpath in the global configuration for email-ext.

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


--

Mario Jauvin

unread,
Jun 9, 2020, 4:43:03 PM6/9/20
to Jenkins Users
I did and it works.
Reply all
Reply to author
Forward
0 new messages