Add support git publisher rebase before push

This change adds support for git publisher rebase before push. [0]

[0] https://plugins.jenkins.io/git/

Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Change-Id: I3cb0eecbbee6c51433cb4e3b856a3165462f49d1
This commit is contained in:
Zhang Xiaoxu 2022-01-28 10:46:54 +08:00
parent 7b621cf626
commit 013c1a0835
3 changed files with 5 additions and 0 deletions

View File

@ -5323,6 +5323,8 @@ def git(registry, xml_parent, data):
:branch: * **remote** (`str`) remote repo name to push to
(default 'origin')
* **name** (`str`) name of remote branch to push to
* **rebase** (`bool`) whether or not to rebase before push
(default false)
:arg list notes: notes to push at the completion of the build
@ -5362,6 +5364,7 @@ def git(registry, xml_parent, data):
branch_mappings = [
("remote", "targetRepoName", "origin"),
("name", "branchName", None),
("rebase", "rebaseBeforePush", False),
]
note_mappings = [

View File

@ -19,6 +19,7 @@
<hudson.plugins.git.GitPublisher_-BranchToPush>
<targetRepoName>branchremotename</targetRepoName>
<branchName>some/branch</branchName>
<rebaseBeforePush>true</rebaseBeforePush>
</hudson.plugins.git.GitPublisher_-BranchToPush>
</branchesToPush>
<notesToPush>

View File

@ -14,6 +14,7 @@ publishers:
- branch:
remote: branchremotename
name: "some/branch"
rebase: true
notes:
- note:
remote: remotename