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

Git plugin 2.0 "Recent Changes" is always empty in merge job

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
      Jenkins 1.509.4, Git plugin 2.0, Git client plugin 1.4.6, Debian Linux 7.2 ("Wheezy"), JDK 1.7.0u45 x64
    • Similar Issues:

      Description

      The "Recent Changes" list in merge jobs which use the Git plugin are now empty. Prior to Git plugin 2.0, the "Recent Changes" list showed those changes whose merge was attempted, whether the merge succeeded or not

      Steps to duplicate the problem (with apologies for the number of steps)

      1. Create a bare git repo on the master node as Jenkins user
        1. rm -rf /tmp/changes.git /tmp/changes
        2. git init --bare /tmp/changes.git
        3. echo "#! /bin/sh" > /tmp/changes.git/hooks/post-receive
        4. echo "curl --silent http://127.0.0.1:8080/git/notifyCommit?url=/tmp/changes.git" >> /tmp/changes.git/hooks/post-receive
        5. chmod a+x /tmp/changes.git/hooks/post-receive
        6. cd /tmp
        7. git clone changes.git
        8. cd changes
        9. echo "Git plugin 2.0 no longer shows changes from merges" > README
        10. git add README
        11. git commit -m "Add README to describe this repository" README
        12. git push origin master
      2. Create a Jenkins merge job using that bare git repo
        1. Create a new free-style software project "merge-changes"
        2. Restrict where this project can be run
          1. Label Expression: master
        3. Git source code management settings
          1. Repository URL: /tmp/changes.git
          2. Branches to build: */master*
        4. Additional behaviors: Merge before build
          1. Name of repository: origin
            1. (error on merge if this is blank - help says should use default, but didn't)
          2. Branch to merge to: master
        5. Poll SCM (for convenience with the git hook installed earlier)
          1. H * * * *
        6. Add post-build action: Git Publisher
          1. Git Publisher settings
            1. Merge results: Yes
            2. Branches:
              1. Branches to push: master
              2. Target remote name: origin
        7. Save the job
      3. Build Jenkins job
        1. curl --silent http://127.0.0.1:8080/job/merge-changes/build?delay=0sec
          1. Note that the "Recent Changes" will report no changes in any build
      4. Create new master-add-timestamp branch and commit from it
        1. git checkout -b master-add-timestamp
        2. date >> timestamp
        3. git add timestamp
        4. git commit -m "Add timestamp" timestamp
        5. git push origin master-add-timestamp
      5. Jenkins job runs, but "Recent Changes" still reports "No changes in any of the builds"
      6. Confirm master branch received the merge result
        1. git checkout master
        2. git pull
      7. Create new master-add-timestamp2 branch and commit from it
        1. git checkout -b master-add-timestamp2
        2. date >> timestamp2
        3. git add timestamp2
        4. git commit -m "Add new timestamp2" timestamp2
        5. git push origin master-add-timestamp2
        6. BUG: Merge will happen and be pushed, but no change listed
      8. Confirm master branch received the merge result
        1. git checkout master
        2. git pull

        Attachments

          Activity

            People

            • Assignee:
              ndeloof Nicolas De Loof
              Reporter:
              markewaite Mark Waite
            • Votes:
              4 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: