I\'m trying to publish to Docker from my Jenkins Pipeline but most things I try result in an error. My latest try was this:
docker.withDockerRegistry(\'https
This is an ancient question, but I'd like to point out for the benefit of people googling the phrase at the top:
When you get a "Scripts not permitted to use method" error that is specifically about groovy.lang.GroovyObject invokeMethod, the reason is almost always that you have invoked a method on an object that does not have that method.
In this case, you tried to invoke docker.withDockerRegistry. There is no method on docker named withDockerRegistry.
The method is called simply withRegistry.
Note that "Scripts not permitted..." errors that are not about GroovyObject invokeMethod are actual permission issues, but such errors involving GroovyObject invokeMethod are generally the security system masking a "no such method" error