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

Unable to get the token FILE to work as documented

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Not A Defect
    • Component/s: email-ext-plugin
    • Labels:
      None
    • Environment:
      jenkins v1.413
      email-ext v2-14
    • Similar Issues:

      Description

      I'm unable to get the token FILE to work as documented:

      ${FILE, path} - Includes the content of a specified file.
      path - The path to the file. Relative to the workspace root.
      

      In the mail content definition I have something like

      Executed with the following <b>build.cs</b>:<br/>
      ${FILE,build.cs}
      

      In the mail received it just shows the normal html result but without evaluating the token FILE and including the content of the file build.cs (which is visible on the root of workspace).

        Attachments

          Activity

          Hide
          slide_o_mix Alex Earl added a comment -

          Try ${FILE,path='build.cs'}

          Show
          slide_o_mix Alex Earl added a comment - Try ${FILE,path='build.cs'}
          Hide
          josesa Jose Sa added a comment -

          With single quotes it was the same, however with double quotes it worked:

          Executed with the following <b>build.cs</b>:<br/>
          <PRE>
          ${FILE,path="build.cs"}
          </PRE>
          

          So maybe refining the documentation and providing a working example would do the trick to solve this issue.

          Show
          josesa Jose Sa added a comment - With single quotes it was the same, however with double quotes it worked: Executed with the following <b>build.cs</b>:<br/> <PRE> ${FILE,path="build.cs"} </PRE> So maybe refining the documentation and providing a working example would do the trick to solve this issue.
          Hide
          slide_o_mix Alex Earl added a comment -

          Yeah, sorry, I meant to put double quotes, but was thinking of something else. Can we close this issue as not a bug then?

          Show
          slide_o_mix Alex Earl added a comment - Yeah, sorry, I meant to put double quotes, but was thinking of something else. Can we close this issue as not a bug then?
          Hide
          josesa Jose Sa added a comment -

          Have you fixed the documentation then ?

          Show
          josesa Jose Sa added a comment - Have you fixed the documentation then ?
          Hide
          slide_o_mix Alex Earl added a comment -

          The documentation in the content token reference at the top is as follows, it applies to all tokens.

          All arguments are optional. Arguments may be given for each token in the form name="value" for strings and in the form name=value for booleans and numbers. The

          {'s and }

          's may be omitted if there are no arguments.

          Examples: $TOKEN, ${TOKEN}, ${TOKEN, count=100}, ${ENV, var="PATH"}

          Show
          slide_o_mix Alex Earl added a comment - The documentation in the content token reference at the top is as follows, it applies to all tokens. All arguments are optional. Arguments may be given for each token in the form name="value" for strings and in the form name=value for booleans and numbers. The {'s and } 's may be omitted if there are no arguments. Examples: $TOKEN, ${TOKEN}, ${TOKEN, count=100}, ${ENV, var="PATH"}

            People

            • Assignee:
              slide_o_mix Alex Earl
              Reporter:
              josesa Jose Sa
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: