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

Possibly incorrect quoting logic for system properties passed to gradle cli

      Possibly incorrect quoting logic for system properties passed to gradle cli.

      The problem resides in this property format:

      -Dproperty=renaming XYZ >> 'xyz'

      which the gradle plugin translates it to:

       

      '-Dproperty="renaming XYZ >> 'xyz'"'
      

      In Jenkins parameters:

       

      property renaming XYZ >> 'xyz'

      With the help of a gradle team member - wolfs - he marked the code snippet in the gradle-plugin project that may cause this issue.

      I previously opened an issue in the gradle project. You can hace a look on the conversation, as the problem is well demonstrated there.

       

       

          [JENKINS-42573] Possibly incorrect quoting logic for system properties passed to gradle cli

          Code changed in jenkins
          User: Stefan Wolf
          Path:
          README.md
          src/main/java/hudson/plugins/gradle/Gradle.java
          src/test/groovy/hudson/plugins/gradle/GradlePluginIntegrationTest.groovy
          http://jenkins-ci.org/commit/gradle-plugin/7752876638cc371cb7dfaf81e35cb5644e8f10e4
          Log:
          Drop custom parameter escaping

          Escaping done by `addKeyValuePairs` is already enough.

          [FIXED JENKINS-42573]

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stefan Wolf Path: README.md src/main/java/hudson/plugins/gradle/Gradle.java src/test/groovy/hudson/plugins/gradle/GradlePluginIntegrationTest.groovy http://jenkins-ci.org/commit/gradle-plugin/7752876638cc371cb7dfaf81e35cb5644e8f10e4 Log: Drop custom parameter escaping Escaping done by `addKeyValuePairs` is already enough. [FIXED JENKINS-42573]

          Stefan Wolf added a comment -

          spac3hit: I think I fixed the problem. Could you try out the artifact from here: https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fgradle-plugin/detail/master/22/artifacts ?

          Stefan Wolf added a comment - spac3hit : I think I fixed the problem. Could you try out the artifact from here: https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fgradle-plugin/detail/master/22/artifacts  ?

          spac3hit added a comment - - edited

          wolfs it worked perfectly!

          //sending param as:
          "-DghprbPullTitle=renaming XYZ >> 'xyz'"
          

          version: 1.27-SNAPSHOT (private-03/10/2017 22:25-?)

          spac3hit added a comment - - edited wolfs it worked perfectly! //sending param as: "-DghprbPullTitle=renaming XYZ >> 'xyz' " version: 1.27-SNAPSHOT (private-03/10/2017 22:25-?)

          Stefan Wolf added a comment -

          1.27 has been released.

          Stefan Wolf added a comment - 1.27 has been released.

            wolfs Stefan Wolf
            spac3hit spac3hit
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: