-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
scm-sync-configuration plugin 0.0.8
I am using scm-sync-configuration plugin with github. I have a nice README.md telling people not to edit the configurations directly as they are managed by scm-sync-configuration.
The bug is even when I modify the README.md, scm-sync-configuration fails. This is because the remote repository is ahead of the local checkout by 1 commit.
This is actually not a problem as the README.md is not a conflicting change! In git a pull will update your local checkout without issue.
Repo case:
- Already have scm-sync-configuration syncing with github
- Modify the README.md
- Change a job
Expected result:
The change to the job is pushed up to github
Actual result:
Sync fails.
How to fix
- On Jenkins master go to $JENKINS_HOME/scm-sync-configuration/checkoutConfiguration/
- git pull
- git commit --amend --author 'Jenkins Continuous Build server <jenkins@localhost.localdomain>'
- git push
- clear the scm sync error at bottom of Jenkins page
- restart Jenkins master (I use http://JENKINS_URL/restart)
The last step is needed as this is another bug with scm-sync-plugin where if you modify the scm repository on disk, its internal in-memory data structures are out of sync. So you restart Jenkins to clear the in-memory state.