jenkins 将多个分支合并到 "integration-branch" 从 master 分支
jenkins merge multiple branches to "integration-branch" branched from master
如果有办法在 git 中从 master 创建一个分支 newbranch1 并在 jenkins 中将多个分支 B1、b2、b3 合并到 newbranch1 中,能否请您告诉我?
是的,这应该很简单(如果您使用 Linux 作为 OS,则更是如此)。
使用 Git SCM 插件配置 repo。然后你会想使用 shell 插件和 运行 你正在描述的 git 命令:
git fetch origin #not strictly necessary
git checkout -b newbranch1 origin/master
git merge B1 b2 b3
# it would be wise to put some smarts in here... $? && git push maybe?
git push origin master
当然,git&Jenkins也只能做这么多了。如果存在 git 无法解决的冲突,那么这项工作对您的帮助不大,因为您需要手动执行合并。
如果有办法在 git 中从 master 创建一个分支 newbranch1 并在 jenkins 中将多个分支 B1、b2、b3 合并到 newbranch1 中,能否请您告诉我?
是的,这应该很简单(如果您使用 Linux 作为 OS,则更是如此)。
使用 Git SCM 插件配置 repo。然后你会想使用 shell 插件和 运行 你正在描述的 git 命令:
git fetch origin #not strictly necessary
git checkout -b newbranch1 origin/master
git merge B1 b2 b3
# it would be wise to put some smarts in here... $? && git push maybe?
git push origin master
当然,git&Jenkins也只能做这么多了。如果存在 git 无法解决的冲突,那么这项工作对您的帮助不大,因为您需要手动执行合并。