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

后端 未结 2 1609
野的像风
野的像风 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:19

    You can do premerging via extensions block in pipelines (assuming you configured checkout: [ $class: 'GIT_SCM' ] already.)

    [
            $class: "PreBuildMerge",
            options: [
                mergeTarget: "master",
                fastForwardMode: "FF",
                mergeRemote: "origin",
                mergeStrategy: "OURS"
            ]
    ]
    

提交回复
热议问题