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

Unwanted characters are added to custom managed file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • token-macro-plugin
    • None
    • 308.v4f2b_ed62b_b_16

      Hello,

      I'm reporting it first in config-file-provider-plugin since the issues is reproducible by using config-file-provider-plugin

      Note that, as the token-macro version is the culprit, the issue lies within

      • the combination of config-file-provider-plugin and token-macro
      • or
      • only token-macro

      To reproduce

      Note that the issue was also reproduced in a pipeline build with configFileProvider(...)

      • Jenkins 2.340
      • Config-file-provider-plugin 3.9.0 (latest at the moment of writing these lines)
      • token-macro plugin 285.vff7645a_56ff0 (latest at the moment of writing these lines)
      • Steps (Screenshots for each step below)
        • Create a custom managed file with tokens.
          1. Put
      "$hello/$dear"

      as the file contents with tokens.
      Doesn't matter what the tokens are, it just need to be activated. Token must not be one of the strings contained in the config file.

        • Create an empty Freestyle Build
          1. Use this managed file so it's available in the workspace
        • Run the build, go to the workspace files and
          1. See the managed file is now this with additional characters.
      "$hello//$dear""

      To reproduce without the issue

      • Jenkins 2.340
      • Config-file-provider-plugin 3.9.0
      • token-macro plugin 267.vcdaea6462991. I haven't tried with versions between 267[   and   ]285

       

      Workaround

      Avoid usage of dollar sign $. However, it's not possible in all cases.**

       

        1. image-2022-04-07-16-35-34-066.png
          167 kB
          Louis-Rémi Paquet
        2. image-2022-04-07-16-37-05-195.png
          70 kB
          Louis-Rémi Paquet
        3. image-2022-04-07-16-39-53-600.png
          69 kB
          Louis-Rémi Paquet
        4. image-2022-04-07-16-48-47-738.png
          9 kB
          Louis-Rémi Paquet

            slide_o_mix Alex Earl
            l_r Louis-Rémi Paquet
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: