I'm using Jenkins with the Git Plugin. Facts:
develop
and rc
with the same ancestor. develop
is at commit 635d361d2005f74dd55f274bf409d43d6413d9b0
develop
it into rc
x.html
independently in both branches that causes a conflict when mergingdevelop
changes to trump rc
changes when conflict occursIn the project via the git plugin, I've added an additional behavior "Merge before build" and I can set the strategy to be "recursive".
This configuration generates a merge that looks like this when run:
git checkout -f origin/rc
git merge -s recursive 635d361d2005f74dd55f274bf409d43d6413d9b0
However, I can't seem to specify the any strategy options, so this just generates a conflict.
Specifically I'm trying to do a merge accept theirs on conflict like below:
git checkout -f origin/rc
git merge -s recursive --strategy-option theirs 635d361d2005f74dd55f274bf409d43d6413d9b0
Can this be achieved with the plugin?
I don't believe it is possible to set a merge-strategy option using the Jenkins Git plugin. What I did as a workaround was to delete the additional behavior "Merge before build". Then on the "Build" phase add a build step "Execute shell" and call the commands you were trying to execute.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With