Where can I find the "managed files" physical files on a Jenkins server?

Viewed 3579

I am copying files to a new Jenkins server.

I can copy the Jobs from the jenkins/jenkins_home/jobs directory.

Can I also find and copy the Managed Files from the Jenkins server directly, so I can copy these to a new server? Where are these files located for copy? I can't see any reference to them in the jenkins_home directory.

For reference, I'm referring to these Managed Files.

ci

1 Answers

You should find them in a file : ${JENKINS_HOME}/org.jenkinsci.plugins.configfiles.GlobalConfigFiles.xml

The format is xml, based on content. There's the "managed-scripts" plugin section.

eg:

<?xml version='1.1' encoding='UTF-8'?>
<org.jenkinsci.plugins.configfiles.GlobalConfigFiles plugin="config-file-provider@3.6">
   <configs class="sorted-set">
      <comparator class="org.jenkinsci.plugins.configfiles.GlobalConfigFiles$1"/>
      <org.jenkinsci.plugins.configfiles.groovy.GroovyScript>
      </org.jenkinsci.plugins.configfiles.groovy.GroovyScript>

      <org.jenkinsci.plugins.configfiles.maven.GlobalMavenSettingsConfig>
      </org.jenkinsci.plugins.configfiles.maven.GlobalMavenSettingsConfig>

      <org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig>
      </org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig>

      <org.jenkinsci.plugins.managedscripts.ScriptConfig plugin="managed-scripts@1.4">
      </org.jenkinsci.plugins.managedscripts.ScriptConfig>
   </configs>
</org.jenkinsci.plugins.configfiles.GlobalConfigFiles>

addendum: To answer the more general, implied portion of the question, suggest you review: Administering Jenkins.

 +- config.xml     (jenkins root configuration)
 +- *.xml          (other site-wide configuration files)
 +- plugins/       (stores plugins)

Progressively, many configurations which used to reside in the config.xml have been split into specific files per plugin (as plugins are updated). Not sure where that was specified.

You probably will find you need all of ${JENKINS_HOME}/*.xml to be copied to your new server, along with the plugins in ${JENKINS_HOME}/plugins/*

Related