you can use directly a class from the Shared library

This is an example in our shared library 
(https://github.com/elastic/apm-pipeline-library)
https://github.com/elastic/apm-pipeline-library/blob/master/src/co/elastic/matrix/DefaultParallelTaskGenerator.groovy

and a pipeline that uses that class
https://github.com/elastic/apm-integration-testing/blob/master/.ci/integrationTestDownstream.groovy#L89

El miércoles, 6 de enero de 2021 a las 18:23:12 UTC+1, [email protected] 
escribió:

> Hi,
>
> Can we define a pipeline DSL script importing a shared lib which is a java 
> class ?
>
> Script
> @org.jenkinsci.plugins.workflow.libs.Library('mytools')
>
> import org.mytools.Messaging // The Java class imported as shared lib 
> Messaging m = new Messaging();
>
> The java class has been defined under the folder 
> `src/main/org/mytools/Messaging.java` within the git project cloned as 
> shared lib
>
> Cheers
>
> Charles
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/1216e835-5752-482f-b887-565bc4cc7194n%40googlegroups.com.

Reply via email to