Config File Provider Plugin

Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID config-file-provider Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
2.9.3 (archives)
Aug 20, 2015
token-macro (version:1.5.1)
credentials (version:1.21)
Source Code
Issue Tracking
Pull Requests
Open Issues
Pull Requests
Olivier Lamy (id: olamy)
Dominik Bartholdi (id: imod)
Usage Installations 2014-Nov 4904
2014-Dec 4966
2015-Jan 5300
2015-Feb 5519
2015-Mar 5976
2015-Apr 6096
2015-May 6276
2015-Jun 6559
2015-Jul 6875
2015-Aug 6886
2015-Sep 7155
2015-Oct 7508

Adds the ability to provide configuration files (i.e., settings.xml for maven, XML, groovy, custom files, etc.) loaded through the Jenkins UI which will be copied to the job's workspace.

How it works

It will allow you to copy various similar configuration files to all your nodes. It also adds the ability to edit those files through the Jenkins UI.

File Types

In general, you can manage whatever file format you like with this plugin (except binary), but the UI provides some advanced editing support for the following file types:

  • Maven settings.xml (user and global)
  • plain XML
  • Groovy
  • JSON
  • Custom (plain text)

Load your configuration file content.

Choose the Configuration in the administration home:

Edit an existing file or add a new file:

Choose the configuration type:

Edit the content:

Configure the Maven plugin to use it:

Provide any config file to a project

Maven Server Credentials (since 2.7)

The file types 'Global Maven settings.xml' and 'Maven settings.xml' have built-in support for the Credentials Plugin. When the plugin serves the settings.xml to the maven execution, the credentials get injected. This functionality is only available in the maven builder (e.g. for freestyle projects) and maven project type.
After installation of the Config File Provider Plugin, a new Credentials Specification is available and can be used to mark credentials domain to contain credentials valid for maven server ids. The "Maven serverId" Specification allows you to define serverId patterns - this will make it easier to select the correct credential when configuring the settings.xml.

The current implementation supports "Username with password"-credentials. If your passwords are encrypted by maven, you can store the encrypted passwords in the same configuration - but you have to make sure the settings-security.xml is available to the job, unfortunately maven does not yet provide a way to pass this file aswell, so this file has to be located at the original location required by maven (<user.home>/.m2)

When configuring the settings.xml (user or global), you can add as many credential mappings as you wish, as soon as you add at least one serverId-credentials mapping to a config file all server configs in the same file will be removed and replaced by the ones you have explicitly added - this way you are sure which credentials finally end up in the file used by the jobs.

This example will add two server configurations to your settings.xml, one called '' (using 'release_user' with password) and the other '' (using 'snapshot_user' with password).

Now provided settings.xml with credentials can be used in the project and builder configuration. A common practice would be to define a global settings.xml to provide credentials and repository definitions and have local (default) settings.xml define the location of the local repo.

Plugins adding support for new file types

Page: Managed Script Plugin — Managed scripts are shell scripts which are managed centrally by an administrator and can be referenced as a build step within jobs.

Extension Point

This plugin makes use of the org.jenkinsci.lib.configprovider.ConfigProvider ExtensionPoint. If you need to have easy administration of a new file type, just implement this ExtensionPoint and you're ready to go.

The easiest way to do so is to extend 'org.jenkinsci.lib.configprovider.AbstractConfigProviderImpl' - have a look at 'org.jenkinsci.plugins.managedscripts.ScriptConfig.ScriptConfigProvider'

Help and Support

For Help and support please use the Jenkins Users mailing list.
The comment list below is not monitored.

Known issues


Version 2.9.3 (20. Aug 2015)
Version 2.9.2 (4. Aug 2015)
Version 2.8.1 (11. May 2015)
  • add option to preserve 'server's in managed maven settings.xml
Version 2.7.5 (8. Aug 2014)
Version 2.7.4 (30.March 2014)
  • fix JENKINS-21494 Credentials are not injected in the settings via the environment variable PR #6
  • Improved target path parsing for Config File PR #5
  • some spelling fixes PR #7
Version 2.7.1 (4.Nov. 2013)
Version 2.7 (3. Nov. 2013)
Version 2.6.2 (17. Sep. 2013)
Version 2.6.1 (1. Aug. 2013)
  • disabling support for credentials in settings.xml - sorry, there are some concept changes to be done to keep it in sync with the credentials plugin
Version 2.6 (23. July 2013)
Version 2.5.1 (2. June 2013)
  • fix JENKINS-17555 Environment variables not set for maven projects types
Version 2.5 (15. March 2013)
  • fix JENKINS-17031 add support for JSON files by adding a new provider/file type
  • fix JENKINS-16694 Config-file-provider does not submit modified file
Version 2.4 (12. Dez 2012)
  • implement JENKINS-15962 Provide BuildStep that publishes selected config file.
  • implement JENKINS-14823  allow environment variables in Target definition
  • fix JENKINS-15976 Provided maven settings.xml in maven builder is lost
Version 2.3 (19. Nov 2012)
  • depends on core 1.491
  • Implement new EP of core to provide maven settings and global settings for maven project type and maven build step
  • remove dependency to maven-plugin
  • fix JENKINS-14914 Errors in hudson-dev:run relating to config-file-provider
  • implement JENKINS-15197 Add support for Maven toolchains configuration file (pull #3)
Version 2.2.1 (27. April 2012)
  • Fixed JENKINS-13533 Maven build fails on CleanTempFilesAction#tempFiles serialization
Version 2.1 (16. April 2012)
  • Fixed JENKINS-12823 Clean up temporary config files at the very end, not before post-build
Version 2.0 (3. April 2012)
  • lift dependency to core 1.458
  • change dependency direction between maven-plugin and config-file-provider-plugin (maven-plugin -> (optional) config-file-provider-plugin)
  • upgrade to version 1.2 config-provider-model
Version 1.2 (8. Nov. 2011)
  • upgrade to version 1.1 config-provider-model
  • upgrade to dependency to core 1.438 (required to better decouple dependencies)
  • enhance API to better support config-file-provider extensionpoint
Version 1.1 (29th August 2011)
  • fix JENKINS-10770 - make sure config files are available for m2-extra-steps
  • add new file types: groovy, xml
  • allow definition of a variable name to access the config file location
Version 1.0 (16th August 2011)


plugin-maven plugin-maven Delete
plugin-external plugin-external Delete
plugin-groovy-related plugin-groovy-related Delete
credentials-provider credentials-provider Delete
credentials-consumer credentials-consumer Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Add Comment