Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-58792

@grab no longer works in jenkins v2.176.2

    Details

    • Similar Issues:

      Description

      I had a jenkinsfile pipeline that run successfully in v2.89.4

      But the same pipeline throws the following error in v2.176.2

       
      java.lang.RuntimeException: No suitable ClassLoader found for grab

       

      My jenkinsfile looks like

       

      @Grab('org.codehaus.groovy.modules.http-builder:http-builder:0.5.0-RC2')
      import groovy.json.JsonOutput
      import groovyx.net.http.RESTClient
      import static groovyx.net.http.ContentType.JSON
      import groovy.json.JsonSlurper
      import groovy.io.FileType
      
      def call(body) {
          pipelineConfig = [:]
          body.resolveStrategy = Closure.DELEGATE_FIRST
          body.delegate = pipelineConfig
      
          pipeline {...}
      }
      
      

       

        Attachments

          Issue Links

            Activity

            Hide
            nsurana Nitin Surana added a comment - - edited

            Duplicate of https://issues.jenkins-ci.org/browse/JENKINS-41122

            In the new jenkins, instead of creating pipelines libraries globally, I created pipeline library for a specific multi-branch project.

            Show
            nsurana Nitin Surana added a comment - - edited Duplicate of  https://issues.jenkins-ci.org/browse/JENKINS-41122 In the new jenkins, instead of creating pipelines libraries globally, I created pipeline library for a specific multi-branch project.

              People

              • Assignee:
                nsurana Nitin Surana
                Reporter:
                nsurana Nitin Surana
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: