How to auto merge Git branches prior to a Jenkins build?

后端 未结 2 1611
野的像风
野的像风 2021-02-04 01:15

How to auto merge Git branches prior to a Jenkins build?

I have 2 builds, one for branch master and one for production.

I would like to do Git merge <

2条回答
  •  灰色年华
    2021-02-04 01:20

    That's supported by the latest Git Plugin on Jenkins. Just set "Checkout/merge to local branch" to "production" under the Advanced settings for Git in the Job configuration. Then set the "Branches to build" to master, or just leave it blank to have Jenkins try and merge and build each other branch it finds to production. It will do one merge/build for each branch. It can also push the merged branch back to the source it pulled from.

    Check this out: https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin#GitPlugin-AdvancedFeatures

提交回复
热议问题