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

Gradle Plugin: Problems with Newlines in -P parameter

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • gradle-plugin
    • None

      We have a test field to enter a change long for building with Jenkins + Gradle Plugin.

      If our CHANGELOG text parameter contains newlines then this causes the build to fail:

      FAILURE: Could not determine which tasks to execute.

      I wasn't able to post the full output here. But suffice it to say that the newlines cause the gradle or the gradle plugin to be unable to parse the other parameters properly.

          [JENKINS-17871] Gradle Plugin: Problems with Newlines in -P parameter

          Oliver Drobnik created issue -
          Oliver Drobnik made changes -
          Description Original: We have a test field to enter a change long for building with Jenkins + Gradle Plugin.

          If our CHANGELOG text parameter contains newlines then this causes the build to fail:


          [AutoIngest (Release)] $ /bin/sh -xe /var/folders/p5/v9glzkn926l0t4ccjrxr2ysm0000gq/T/hudson8002412059339489964.sh
          + /Users/groundskeeper/Jenkins/tools/hudson.plugins.gradle.GradleInstallation/Gradle_1.4/bin/gradle sparkle-notes sparkleZip '-DCHANGELOG=multiple
          lines

          - bla
          - bla' '-Pxcodebuild.signing.identity=Developer ID Application: Drobnik KG' -Pxcodebuild.signing.certificateURI=http://homer/Jenkins/Provisioning/Cocoanetics/Drobnik_KG_Developer_ID.p12 -Pxcodebuild.signing.certificatePassword=magic123 -Pinfoplist.version=47 -Psparkle.output=sparkle/com.cocoanetics.AutoIngest/47
          added cleanup for certificate

          FAILURE: Could not determine which tasks to execute.

          * What went wrong:
          Task '-DCHANGELOG=multiple
          lines

          - bla
          - bla' not found in root project 'AutoIngest (Release)'.

          * Try:
          Run gradle tasks to get a list of available tasks.

          BUILD FAILED
          New: We have a test field to enter a change long for building with Jenkins + Gradle Plugin.

          If our CHANGELOG text parameter contains newlines then this causes the build to fail:


          [AutoIngest (Release)] $ /bin/sh -xe /var/folders/p5/v9glzkn926l0t4ccjrxr2ysm0000gq/T/hudson8002412059339489964.sh
          + /Users/groundskeeper/Jenkins/tools/hudson.plugins.gradle.GradleInstallation/Gradle_1.4/bin/gradle sparkle-notes sparkleZip '-DCHANGELOG=multiple
          lines

          - bla
          - bla' '-Pxcodebuild.signing.identity=Developer ID Application: Drobnik KG' -Pxcodebuild.signing.certificateURI=http://homer/Jenkins/Provisioning/Cocoanetics/Drobnik_KG_Developer_ID.p12 -Pinfoplist.version=47 -Psparkle.output=sparkle/com.cocoanetics.AutoIngest/47
          added cleanup for certificate

          FAILURE: Could not determine which tasks to execute.

          * What went wrong:
          Task '-DCHANGELOG=multiple
          lines

          - bla
          - bla' not found in root project 'AutoIngest (Release)'.

          * Try:
          Run gradle tasks to get a list of available tasks.

          BUILD FAILED
          Oliver Drobnik made changes -
          Description Original: We have a test field to enter a change long for building with Jenkins + Gradle Plugin.

          If our CHANGELOG text parameter contains newlines then this causes the build to fail:


          [AutoIngest (Release)] $ /bin/sh -xe /var/folders/p5/v9glzkn926l0t4ccjrxr2ysm0000gq/T/hudson8002412059339489964.sh
          + /Users/groundskeeper/Jenkins/tools/hudson.plugins.gradle.GradleInstallation/Gradle_1.4/bin/gradle sparkle-notes sparkleZip '-DCHANGELOG=multiple
          lines

          - bla
          - bla' '-Pxcodebuild.signing.identity=Developer ID Application: Drobnik KG' -Pxcodebuild.signing.certificateURI=http://homer/Jenkins/Provisioning/Cocoanetics/Drobnik_KG_Developer_ID.p12 -Pinfoplist.version=47 -Psparkle.output=sparkle/com.cocoanetics.AutoIngest/47
          added cleanup for certificate

          FAILURE: Could not determine which tasks to execute.

          * What went wrong:
          Task '-DCHANGELOG=multiple
          lines

          - bla
          - bla' not found in root project 'AutoIngest (Release)'.

          * Try:
          Run gradle tasks to get a list of available tasks.

          BUILD FAILED
          New: We have a test field to enter a change long for building with Jenkins + Gradle Plugin.

          If our CHANGELOG text parameter contains newlines then this causes the build to fail:

          FAILURE: Could not determine which tasks to execute.

          I wasn't able to post the full output here. But suffice it to say that the newlines cause the gradle or the gradle plugin to be unable to parse the other parameters properly.

          This issue and JENKINS-20505 deal about the same issue.

          FRANCOIS RITALY added a comment - This issue and JENKINS-20505 deal about the same issue.
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 149167 ] New: JNJira + In-Review [ 177272 ]

          Stefan Wolf added a comment -

          This should be fixed in 1.27.1. If the problem still persists, please reopen.

          Stefan Wolf added a comment - This should be fixed in 1.27.1. If the problem still persists, please reopen.
          Stefan Wolf made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

            gbois Gregory Boissinot
            cocoanetics Oliver Drobnik
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: