jenkinsfile doesn't recognize @Grab [closed] jenkinsfile doesn't recognize @Grab [closed] jenkins jenkins

jenkinsfile doesn't recognize @Grab [closed]


You cannot use @Grab in pipelines at the moment. I doubt it will be added as a feature because Jenkins CPS needs source code to be able to perform CPS transformations, and @Grab uses binary dependencies. You can only use @Grab from trusted shared libraries. From the documentation:

It is possible to use third-party Java libraries, typically found in Maven Central, from trusted library code using the @Grab annotation. Refer to the Grape documentation for details, but simply put: