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

Variable substitution issue when using configuration as code to create managed config files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • None
    • Jenkins 2.150.3
      Config file provider 3.5
      Configuration as code 1.7

      I'm using the config file provider for Maven settings.  The resulting settings file should have a placeholder that will be replaced by Maven.  However, the Maven format this ( ${env.HOME}) causes it to get replaced by some interaction between this plugin and the configuration as code.

      If the CASC source file has 

      <username>${env.USERNAME}</username>

      The config file provider has that line as

      <username></username>

      This is the content of the file when viewed in Manage Jenkins > Managed files > [configuration file].  So this must be happening during the process of applying a new configuration.   I've confirmed that the text is missing in the plugin's config file (org.jenkinsci.plugins.configfiles.GlobalConfigFiles.xml).

      This appears to be a change of behavior with the new version of the configuration file provider plugin.  It was working for me with a previous (probably 2.18) version.

            domi Dominik Bartholdi
            troy_jacobson Troy Jacobson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: