jenkinsci / scm-sync-configuration-plugin

Jenkins scm-sync-configuration plugin
https://plugins.jenkins.io/scm-sync-configuration/
MIT License
115 stars 123 forks source link

Renaming or Deleting a job doesn't work with SVN #55

Open ploutarchos opened 7 years ago

ploutarchos commented 7 years ago

Once a Jenkins job is renamed (or deleted) then the plugin generates SCM errors and does not commit anything to SVN:

SCM Sync status :  
Thu Jun 01 09:35:42 BST 2017 : Delete jobs/My_Jenkins_Job/```

When I manually go to the plugin's directory ".jenkins/scm-sync-configuration/checkoutConfiguration/", and I run "svn status -q", I can see that the svn check out is at a wrong state:

D       jobs/My_Jenkins_Job
D       jobs/My_Jenkins_Job/config.xml
A       jobs/My_Jenkins_Job_New_Name
A       jobs/My_Jenkins_Job_New_Name/config.xml

I then try to manually commit the changes by doing: svn commit -m "Commit current changes"

But I get:

svn: E155011: Commit failed (details follow):
svn: E155011: Directory '/svn/.jenkins/scm-sync-configuration/checkoutConfiguration/jobs/My_Jenkins_Job' is out of date
svn: E170004: Item '/svn/jobs/My_Jenkins_Job' is out of date

When I run: svn update

I am able to manually commit.

However, the plugin continuous to generate the following error every time I modify any Jenkins job:

SCM Sync status :  
Thu Jun 01 09:35:42 BST 2017 : Delete jobs/My_Jenkins_Job/

My current workaround is:

  1. Update plugin's SVN check out
  2. Manually commit any changes from the plugin's directory
  3. Disable the plugin and restart Jenkins
  4. Enable the plugin and restart Jenkins
tollgen commented 6 years ago

I am getting this same issue.

@ploutarchos your workaround worked great, thank you

Oliv95 commented 6 years ago

Is there any update on this? @ploutarchos

ploutarchos commented 6 years ago

@Oliv95, we have stopped using this plugin until this issue is resolved.