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

System groovy, Variables Binding & Classpath properties don't evaluate jenkions variables

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • groovy-plugin
    • None

      Hi,

      When defining System Groovy plugin in my job, i was wishing to use $WORKSPACE variable in the 'Variables Binding' & 'Classpath' properties of the system groovy build step but the plugin implementation doesn't evaluate any variables used in these two properties.

      It would be useful to have this supported.

      Thanks.
      Khalil Jiries.

          [JENKINS-31920] System groovy, Variables Binding & Classpath properties don't evaluate jenkions variables

          Axel Heider added a comment - - edited

          If a build runs, the current dir is always the workspace. Why do you use the $WORKSPACE variable then instead of just a relative path that is passed to build.project.getWorkspace().child("myFile.txt") in your script?

          Not sure about the classpath, maybe you really need $WORKSPACE there to reference things from our workspace. Then this feature would make sense here

          Axel Heider added a comment - - edited If a build runs, the current dir is always the workspace. Why do you use the $WORKSPACE variable then instead of just a relative path that is passed to build.project.getWorkspace().child("myFile.txt") in your script? Not sure about the classpath, maybe you really need $WORKSPACE there to reference things from our workspace. Then this feature would make sense here

            vjuranek vjuranek
            khalilj Khalil Jiries
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: