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

Classpath of systemGroovyCommand cannot resolve a var

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The following Job DSL cannot resolve a var passed for the classpath parameter

      stringParam('SHARED_JAR_PATH'
      'file:////Users/cmoullia/temp/demo/lib/build/libs/lib-0.1.0.jar','Path where the shared lib is available n the jenkins instance')
      ...
      postBuildSteps {            
        systemGroovyCommand(readFileFromWorkspace('restorePOM.groovy'))
        systemGroovyCommand(script) { 
         classpath('$SHARED_JAR_PATH')
      }

      Then we got this error

      ERROR: (script, line 101) classpath must be a valid URL: no protocol: $SHARED_JAR_PATH

      As you can see the var name is passed and not extrapolated to get the value

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            daspilker Daniel Spilker
            Reporter:
            cmoulliard Charles Moulliard
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: