Git 在任何发布后自动合并发布分支到 master
Git automatically merge release branch to master after any release
bitbucket或jenkins中是否有feature/plugin或设置在每次发布后自动将发布分支合并到master中?
提前致谢。
如果您创建一个作业并使用 Generic Webhook Trigger Plugin,您可以在标签被推送到 Bitbucket 时触发该作业。这里有例子:
- Bitbucket 云:https://github.com/jenkinsci/generic-webhook-trigger-plugin/blob/master/src/test/resources/org/jenkinsci/plugins/gwt/bdd/bitbucket-cloud/bitbucket-cloud-tag.feature
- Bitbucket 服务器:https://github.com/jenkinsci/generic-webhook-trigger-plugin/blob/master/src/test/resources/org/jenkinsci/plugins/gwt/bdd/bitbucket-server/bitbucket-server-tag.feature
将标签名称作为变量贡献给构建,您可以拥有一个将 tag
合并到 master
的管道脚本。如果不是所有创建的标签都是发布,您可以使用插件过滤功能过滤掉具有特定模式的标签。
node {
sh """
git clone ...
git checkout master
git merge $theVariableContainingTagNameYouConfigured
"""
}
bitbucket或jenkins中是否有feature/plugin或设置在每次发布后自动将发布分支合并到master中?
提前致谢。
如果您创建一个作业并使用 Generic Webhook Trigger Plugin,您可以在标签被推送到 Bitbucket 时触发该作业。这里有例子:
- Bitbucket 云:https://github.com/jenkinsci/generic-webhook-trigger-plugin/blob/master/src/test/resources/org/jenkinsci/plugins/gwt/bdd/bitbucket-cloud/bitbucket-cloud-tag.feature
- Bitbucket 服务器:https://github.com/jenkinsci/generic-webhook-trigger-plugin/blob/master/src/test/resources/org/jenkinsci/plugins/gwt/bdd/bitbucket-server/bitbucket-server-tag.feature
将标签名称作为变量贡献给构建,您可以拥有一个将 tag
合并到 master
的管道脚本。如果不是所有创建的标签都是发布,您可以使用插件过滤功能过滤掉具有特定模式的标签。
node {
sh """
git clone ...
git checkout master
git merge $theVariableContainingTagNameYouConfigured
"""
}