This section is a work in progress. Want to help? Check out the jenkinsci-docs mailing list. For other ways to contribute to the Jenkins project, see this page about participating and contributing.

Jenkins uses the file system to store its data. Directories are created inside $JENKINS_HOME in a way that models the object model structure. Some data, like console output, are stored just as plain text file, some are stored as Java property files. But the majority of the structured data, such as how a project is configured, or various records of the build, are persisted by using XStream.

This allows object state to be persisted relatively easily (including those from plugins), but one must pay attention to what’s serialized in XML, and take measures to preserve backward compatibility. For example, in various parts of Jenkins you see the transient keyword (which instructs XStream not to bind the field to XML), fields left strictly for backward compatibility, or re-construction of in-memory data structure after data is loaded.