Details
-
Type:
Bug
-
Status: Resolved (View Workflow)
-
Priority:
Minor
-
Resolution: Not A Defect
-
Component/s: config-file-provider-plugin
-
Labels:None
-
Environment:Jenkins 2.150.3
Config file provider 3.5
Configuration as code 1.7
-
Similar Issues:
Description
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.
Closing. I finally found the way (prefix the sequence with a ^) to prevent the substitution.