jenkins-gitlab-merge-request-builder-plugin
                                
                                
                                
                                    jenkins-gitlab-merge-request-builder-plugin copied to clipboard
                            
                            
                            
                        Incompatible configuration file between v1.4.2 and v2.0.0
Hi.
I upgrade Gitlab Merge Request Builder Plugin from v1.4.2 to v2.0.0, then all settings were initialized!
Problem commit is https://github.com/timols/jenkins-gitlab-merge-request-builder-plugin/commit/7db92291400d6b0d94f29f6ccd1b63ddbae32b62#diff-2a2ae89bc4c1579a77be4e4d68f9fdb1L34
These changes are changes that break compatibility.
Why
Plugin Instance variables are serialized to xml files (e.g . $JENKINS_HOME/org.jenkinsci.plugins.gitlab.GitlabBuildTrigger.xml)
Instance variable name is key in xml file. If these are changed without appropriate migration, settings are initialized !
[Example] GitlabBuildTrigger.xml @1.4.2
<?xml version='1.0' encoding='UTF-8'?>
<org.jenkinsci.plugins.gitlab.GitlabBuildTrigger_-GitlabBuildTriggerDescriptor plugin="[email protected]">
  <__botUsername>jenkins</__botUsername>
  <__gitlabHostUrl>http://example.com/</__gitlabHostUrl>
  <__assigneeFilter></__assigneeFilter>
  <__botApiTokenSecret>**********</__botApiTokenSecret>
  <__cron>*/2 * * * *</__cron>
  <__enableBuildTriggeredMessage>false</__enableBuildTriggeredMessage>
  <__successMessage>Build finished.  Tests PASSED. :green_heart:</__successMessage>
  <__unstableMessage>Build finished.  Tests FAILED. :broken_heart:</__unstableMessage>
  <__failureMessage>Build finished.  Tests FAILED. :broken_heart:</__failureMessage>
  <__ignoreCertificateErrors>false</__ignoreCertificateErrors>
[Example] GitlabBuildTrigger.xml @2.0.0
<?xml version='1.0' encoding='UTF-8'?>
<org.jenkinsci.plugins.gitlab.GitlabBuildTrigger_-GitlabBuildTriggerDescriptor plugin="[email protected]">
  <botUsername>jenkins</botUsername>
  <gitlabHostUrl>http://example.com/</gitlabHostUrl>
  <assigneeFilter></assigneeFilter>
  <tagFilter></tagFilter>
  <botApiTokenSecret>**********</botApiTokenSecret>
  <cron>*/2 * * * *</cron>
  <enableBuildTriggeredMessage>false</enableBuildTriggeredMessage>
  <successMessage>Build finished.  Tests PASSED. :green_heart:</successMessage>
  <unstableMessage>Build finished.  Tests FAILED. :broken_heart:</unstableMessage>
  <failureMessage>Build finished.  Tests FAILED. :broken_heart:</failureMessage>
  <ignoreCertificateErrors>false</ignoreCertificateErrors>
Gitlab Merge Request Builder Plugin v2.0.0 can not get v1.x settings.
I recommend that you announce on README that there is a destructive change between v1.4.2 and v2.0.0
I experienced the same issue. Thankfully I had the jobs config history plugin so I was able to put things back in order. Definitely needs a warning.
Affects me so hope you note this issue on README etc.