Docker Plugin for Jenkins error: Scripts not permitted to use method

前端 未结 3 987
你的背包
你的背包 2021-01-14 01:09

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         


        
3条回答
  •  春和景丽
    2021-01-14 02:02

    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

提交回复
热议问题