Xtroce
Xtroce

Reputation: 1824

jenkins git build does not merge

Hi i configured the jenkins git to do a merge before build, but I always run into this error:

11:56:18 Merging Revision 45ed7eae4cdc71d348610819fa0bcbc6d511e99b (origin/features/maven) to /development, UserMergeOptions{mergeRemote='', mergeTarget='development', mergeStrategy='default', fastForwardMode='--ff-only'}
11:56:18  > /usr/bin/git rev-parse /development^{commit} # timeout=10
11:56:18 FATAL: Command "/usr/bin/git rev-parse /development^{commit}" returned status code 128:
11:56:18 stdout: /development^{commit}
11:56:18 
11:56:18 stderr: fatal: ambiguous argument '/development^{commit}': unknown revision or path not in the working tree.

the configuration looks like this:

enter image description here

before he can check out properly

I try to merge according to a pull request from a features/maven branch to development

Upvotes: 0

Views: 741

Answers (2)

Xtroce
Xtroce

Reputation: 1824

The problem was that I did not fill in the name of the repository. If I put origin in there it works

Upvotes: 1

SV Madhava Reddy
SV Madhava Reddy

Reputation: 2018

You are performing the git merge locally which is good. And you are not pushing it to the remote. That's the problem. So please add the action Git Publisher in Post-build Actions. There will be options like, Push Only If Build Succeeds and Merge Results. Please check those and you can find some more options like Branches, Tags, Notes like that. Feel free to explore all those. Hope this helps.

Upvotes: 0

Related Questions