-
Bug
-
Resolution: Unresolved
-
Major
-
Jenkins 2.46.2
Pipeline: Shared Groovy Libraries 2.8
Pipeline: API 2.3
Linux master with both linux and windows slaves.
I have a shared library class I am trying to execute in a jenkins pipeline. In the shared libraries doc it says you can "Grab" an artifact from a maven repo and load it into your classpath. In this case I'm pulling amazon's java sdk so that I can make some calls to describe our AMIs. The groovy class in the shared library works fine if I run it on my local dev box via command line. When I upload it to the shared library and try to execute it through a jenkins pipeline, I get the error below.
hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: com.amazonaws.services.ec2.AmazonEC2Client.describeImages() is applicable for argument types: (com.amazonaws.services.ec2.model.DescribeImagesRequest) values: [{ImageIds: [],Owners: [],ExecutableUsers: [],Filters: [{Name: tag:Name,Values: [Convert Rets Base Image]}]}]
Possible solutions: describeImages(), describeImages(com.amazonaws.services.ec2.model.DescribeImagesRequest), describeTags(), describeTags(com.amazonaws.services.ec2.model.DescribeTagsRequest)
The following classes appear as argument class and as parameter class, but are defined by different class loader:
com.amazonaws.services.ec2.model.DescribeImagesRequest (defined by 'AntClassLoader
...
If one of the method suggestions matches the method you wanted to call,
then check your class loader setup.
...
I've included the pipeline I'm using, the console output of the build, and the groovy script I'm calling in the shared library. I haven't been able to find anything online and it looks like I'm doing everything the documentation says I should be doing. I'm hoping I just misconfigured something but I'm thinking there may be a bug somewhere.