Jenkins tends to randomly replace
config.xml configuration tags.
This behaviour can be found in any type onf configuration file: system, job, plug-in and so on.
If these files are managed by a source control system (SCM), it can cause problems because it can cause collisions with valid changes made by real people.
The differences need to be resolved one way or the other.
Some examples of replacements are listed below:
- Single quotes are converted into double ones,
- Empty tags are added. For instance,
<categories/>may be removed completely or be replaced with
- CloudBees Core on modern cloud platforms - Managed Master
- CloudBees Core on modern cloud platforms - Operations Center
- CloudBees Core on traditional platforms - Client Master
- CloudBees Core on traditional platforms - Operations Center
- CloudBees Jenkins Enterprise - Managed Master
- CloudBees Jenkins Enterprise - Operations Center
- CloudBees Jenkins Platform - Client Master
- CloudBees Jenkins Platform - Operations Center
- CloudBees Jenkins Distribution
- Jenkins LTS
This is an expected behavior.
Jenkins API allows to serialize items to XML at any moment, and some plugins use this capability to save additional data or to reformat existing ones.
It is not recommended to use a SCM to store the Jenkins configuration.