-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Jenkins 1.509.4, Git plugin 2.0, Git client plugin 1.4.6, Debian Linux 7.2 ("Wheezy"), JDK 1.7.0u45 x64
If I use the jgit implementation in a job which should merge from multiple branches, the merge result is not pushed back to origin. Merge result is pushed if I use the command line implementation in the same job.
Steps to duplicate the problem (with apologies for the number of steps)
- Create a bare git repo on the master node as Jenkins user
- rm -rf /tmp/changes.git /tmp/changes
- git init --bare /tmp/changes.git
- echo "#! /bin/sh" > /tmp/changes.git/hooks/post-receive
- echo "curl --silent http://127.0.0.1:8080/git/notifyCommit?url=/tmp/changes.git" >> /tmp/changes.git/hooks/post-receive
- chmod a+x /tmp/changes.git/hooks/post-receive
- cd /tmp
- git clone changes.git
- cd changes
- echo "Git plugin 2.0 no longer shows changes from merges" > README
- git add README
- git commit -m "Add README to describe this repository" README
- git push origin master
- Create a Jenkins merge job using that bare git repo
- Create a new free-style software project "merge-changes"
- Restrict where this project can be run
- Label Expression: master
- Git source code management settings
- Use jgit rather than default
- Repository URL: /tmp/changes.git
- Branches to build: */master*
- Additional behaviors: Merge before build
- Name of repository: origin
- (error on merge if this is blank - help says should use default, but didn't)
- Branch to merge to: master
- Name of repository: origin
- Poll SCM (for convenience with the git hook installed earlier)
- H * * * *
- Add post-build action: Git Publisher
- Git Publisher settings
- Merge results: Yes
- Branches:
- Branches to push: master
- Target remote name: origin
- Git Publisher settings
- Save the job
- Build Jenkins job
- curl --silent http://127.0.0.1:8080/job/merge-changes/build?delay=0sec
- Create new master-add-timestamp branch and commit from it
- git checkout -b master-add-timestamp
- date >> timestamp
- git add timestamp
- git commit -m "Add timestamp" timestamp
- git push origin master-add-timestamp
- Jenkins job runs
- Confirm master branch did not receive the merge result
- git checkout master
- git pull
- git log
- is duplicated by
-
JENKINS-29271 Git Publisher doesn't PUSH if JGit is used
- Closed
-
JENKINS-25797 jgit is not pushing branch in git publisher
- Closed