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

Build parameter are not overwritten anymore (v1.89 -> 1.90)

    • Icon: Bug Bug
    • Resolution: Postponed
    • Icon: Minor Minor
    • envinject-plugin
    • None
    • Win7
      Jenkins 1.580

      • Create a parameterized job
      • Add a textbox parameter (e.g. Comment = ABC newline BCD)
      • Add a build action: Inject environment variables, in the content field override Comment to e.g. $WORKSPACE
      • Add a shell/winbatch an prompt 'Comment'

      plugin version 1.89 console:
      [EnvInject] - Variables injected successfully.
      new comment value = ${WORKSPACE}
      plugin version 1.90 console:
      [EnvInject] - Variables injected successfully.
      new comment value = ABC

      Assume the property 'Comment' is not overwritten anymore.

      My personal problem:
      I want to give a multiline value via build parameter to an ANT but because of the newlines i permanently get a syntaxerror, so i decided to print te parameter to a file, and give the file to the ant instead.

          [JENKINS-24777] Build parameter are not overwritten anymore (v1.89 -> 1.90)

          Daniel Beck added a comment -

          Probably introduced by the fix to JENKINS-22126, appears to require "Prepare an environment for the run" to be checked, and the new option "Override Build Parameters" to be checked.

          Daniel Beck added a comment - Probably introduced by the fix to JENKINS-22126 , appears to require "Prepare an environment for the run" to be checked, and the new option "Override Build Parameters" to be checked.

          Daniel Beck added a comment -

          While annoying and broken UI, I don't think this is a bug (granted, it could be more discoverable).

          Daniel Beck added a comment - While annoying and broken UI, I don't think this is a bug (granted, it could be more discoverable).

          Daniel Beck added a comment -

          Workaround exists.

          Unfortunately nobody bothers to update the changelog to the plugin, so it's not exactly discoverable.

          Daniel Beck added a comment - Workaround exists. Unfortunately nobody bothers to update the changelog to the plugin, so it's not exactly discoverable.

          That was not my intention, but you gave me the correct hint.
          With your hint i was able to inject the multiline parameter to a new env-var using groovy and pipe the new var to the file. Overriding the original value in the "Prepare an environment for the run" section works so my original problem does not occur anymore.

          I'm not really sure if i should close this ticket having a workaround... But i'll do so.

          Sven Appenrodt added a comment - That was not my intention, but you gave me the correct hint. With your hint i was able to inject the multiline parameter to a new env-var using groovy and pipe the new var to the file. Overriding the original value in the "Prepare an environment for the run" section works so my original problem does not occur anymore. I'm not really sure if i should close this ticket having a workaround... But i'll do so.

            gbois Gregory Boissinot
            zioschild Sven Appenrodt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: