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

FILE token does not evaluate a path that contains an environment variable

    Details

    • Similar Issues:

      Description

      When I try the following in the Default Content of the Editable E-mail Notification:

      ${FILE,path="$MY_FILE_PATH"}

      The contents of the file specified by the path do not get displayed. I have MY_FILE_PATH defined as a property in a properties file that is injected into the environment in the "Prepare an environment for the run" option where the full path of the property file is specified.

      The property file defines: MY_FILE_PATH=custom_info.txt

      where "custom_info.txt" is a file in the workspace of the job that contains some text that I would like to display as part of the e-mail.

      What is strange is that when I receive the e-mail, this appears:

      ${FILE,path="custom_info.txt"}

      So the email-ext plugin evaluates the environment variable MY_FILE_PATH, but the FILE token does not evaluate it as a path.

      The ability to have the FILE token evaluate a path that contains an environment variable would be useful for displaying different information depending on which file path is stored in the environment variable.

      I am running Jenkins 1.480.2.

        Attachments

          Activity

            People

            • Assignee:
              slide_o_mix Alex Earl
              Reporter:
              trincodog Kavita Tiwari
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: