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

Paths to global parsing files should not be absolute

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • log-parser-plugin
    • None

      When configuring global configuration files for the console log parser plugin, the UI under Manage Jenkins accepts a descriptive 'name' for each parser and a path to the configuration file on the Jenkins master. It appears as though these paths only accept absolute URIs to the configuration files. This is problematic for numerous reasons, like if one has a typo in one of the paths they enter or if one changes the location of the Jenkins home folder on the server. In another extreme case that we hit a few months back, we moved our Jenkins master configuration from a Windows server to a Linux box, and these absolute paths caused extra grief during the migration.

      As I see it there could be several different possible solutions to this, not the least of which could be:

      • allow the use of Jenkins 'tokens' within the path declarations so one could use some of the global Jenkins properties like JENKINS_HOME to parameterize the location of the files
      • allow relative paths to be used, with the root path being the Jenkins home folder (ie: paths should be relative to the Jenkins home folder on the master)
      • define a standard / default location within the Jenkins home folder where the plugin looks for parsing files so one could simply provide the name of the log file in the Jenkins master configuration panel and omit the path / folder portion of the URI completely (ie: ${JENKINS_HOME}/log_parsers)

      While I think each of these possible solutions has merrit, and I'm sure a solution could be implemented that incorporated all of these search criteria, I've sorted my list in order of increasing preference myself with the simplest - and probably easiest to implement - solution being to just define a default folder for storing the config files which is relative to the Jenkins home folder to avoid having paths of any kinds in the Jenkins configuration.

            recena Manuel Recena Soto
            leedega Kevin Phillips
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: