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

Make the default/error text for the 'FILE' token configurable

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • email-ext-plugin
    • None

      The FILE token does not allow to configure the text that occurs when the file does not exist. It'd be great if this were configurable for cases when this is a non-exceptional occurrence.

      Example:

      ${FILE, path="logs/warnings.html", filenotfoundmessage="No warnings were recorded in %f"}

      The current (2.35.1) error message would be implemented using this new parameter as follows:

      ${FILE, path="logs/warnings.html", filenotfoundmessage="ERROR: File '%f' does not exist"}

      This assumes there aren't any more error cases than just 'file not found'. Not sure if there are others. Alternatively, make it possible to mark a $FILE token as e.g. optional=true (so errors are discarded), and to provide a 'default text' like in JENKINS-20324.

            slide_o_mix Alex Earl
            danielbeck Daniel Beck
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: