Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-24811

Sync fails for even trivial changes on scm

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major 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:

      1. Already have scm-sync-configuration syncing with github
      2. Modify the README.md
      3. Change a job

      Expected result:
      The change to the job is pushed up to github

      Actual result:
      Sync fails.

      How to fix

      1. On Jenkins master go to $JENKINS_HOME/scm-sync-configuration/checkoutConfiguration/
      2. git pull
      3. git commit --amend --author 'Jenkins Continuous Build server <jenkins@localhost.localdomain>'
      4. git push
      5. clear the scm sync error at bottom of Jenkins page
      6. 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.

            Unassigned Unassigned
            pyrolistical Ronald Chen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: