Jenkins merge dev branch to master with -Xtheir stategy
- by Pandya M. Nandan
In GIT Plugin, we can merge one branch to other on work space before the starting of Build.
However, plugin does not provide -Xtheir strategy. Now i want dev branch to merge on master, validate test cases and if successful then only push back to master.
Problem i face is that if there is a merge conflict, i want changes of dev branch to exits (i know i can use -Xtheirs manually).
[Like i can check git as Source Code Management, but can;t use its Additional behavior 'Merge Before Build' ]
However when i run the required code in Execute Shell Section of Jenkins Job, It does not works as required and fails with error:
fatal: dev - not something we can merge
Jenkins Job Code is
echo Start of Build
git checkout dev
git checkout master
git status
git merge dev --no-commit
echo End of Build
I have also used them with bask -l -c "", but is same problem.