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

Groovy-Plugin does not expand Job-Parameters

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: groovy-plugin
    • Labels:
      None
    • Environment:
      Windows, Jenkins 1.413, Groovy Plugin 1.8
    • Similar Issues:

      Description

      If I create a text parameter "test" in a Job and configure the Groovy Plugin to call a script with this parameter, it is not expanded:

      Groovy Script file: test.groovy
      Script parameters: ${test}

      Will result in:

      <pathToGroovy>/bin/groovy.bat <Workspace>/test.groovy ${test}

      System properties like MAVEN_HOME are expanded as expected when passed as ${MAVEN_HOME}.

      The same works great with the maven build.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Vojtech Juranek
          Path:
          src/main/java/hudson/plugins/groovy/Groovy.java
          http://jenkins-ci.org/commit/groovy-plugin/8cc95812e245ec6a829a4aa702c166d1c961373e
          Log:
          Expansion of job parameters (JENKINS-10525)

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vojtech Juranek Path: src/main/java/hudson/plugins/groovy/Groovy.java http://jenkins-ci.org/commit/groovy-plugin/8cc95812e245ec6a829a4aa702c166d1c961373e Log: Expansion of job parameters ( JENKINS-10525 )
          Hide
          mvonrenteln Marc von Renteln added a comment -

          Checked with 1.9-SNAPSHOT - Commit 8cc95812e245ec6a829a on Gitgub. Works.

          Hint: Does not work for properties with "-". But this is a problem with the jenkins property resolution and not an issue for the groovy plugin.

          Thanks!

          Show
          mvonrenteln Marc von Renteln added a comment - Checked with 1.9-SNAPSHOT - Commit 8cc95812e245ec6a829a on Gitgub. Works. Hint: Does not work for properties with "-". But this is a problem with the jenkins property resolution and not an issue for the groovy plugin. Thanks!

            People

            • Assignee:
              vjuranek vjuranek
              Reporter:
              mvonrenteln Marc von Renteln
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: