I have the following Gitlab + Jenkins setup:
I want Jenkins to do the following:
Is something like this possible in Jenkins? I know Git plugin has an option called "Checkout to a Specific local Branch", but I am not entirely sure if this does what I want.
Any help/input regarding this issue would be highly appreciated. Thanks and Cheers :)
To merge branches locally, use git checkout to switch to the branch you want to merge into. This branch is typically the main branch. Next, use git merge and specify the name of the other branch to bring into this branch. This example merges the jeff/feature1 branch into the main branch.
Go to source code management->Additional Behaviours->Merge before build.
Once the feature is complete, the branch can be merged back into the main code branch. First we run git checkout master to change the active branch back to the master branch. Then we run the command git merge new-branch to merge the new feature into the master branch.
There is a "merge before build" action in the Git plugin. It only merges on the build machine — it doesn't push the merge back to the origin repository.
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