问题描述
我们使用标准的git流程分支模型(develop,master,release- ,hotfix - 等)。
我们希望通过jenkins设置一键式发布。
我在查看。我可以将这个插件设置为从詹金斯单击一次发布吗?如果是这样,什么是配置选项?
特别是,我可以做这样的事情吗?
Jenkins Job
Maven目标:release-start release-finish -Dsomething -Delse
有没有办法告诉它从最新的-SNAPSHOT版本自动构建,例如如果版本是 1.2.3-SNAPSHOT
,它会生成 release-1.2.3
。
否则,是否有一个maven插件可以根据git流分支模型构建版本 (即从 develop
并创建一个名为 release-xyz
)的新发行版分支。 我们从未找到通过Jenkins中的插件或maven目标实现此功能的方法。
我们的解决方案以 bash $结束
和 git flow release start< version>
,maven发布过程, git流发布完成<版本>
和其他的东西(git在开发 master
在一开始时,git 推动
并在最后放松通知)。
We are using the standard git flow branching model (develop, master, release-, hotfix-, etc).
As part of our workflow, we would like to set up a "one-click" release via jenkins.
I was looking at the jgitflow-maven-plugin. Can I set up this plugin to do a one-click release from jenkins? If so, what are the configuration options?
In particular, can I do something like this?
Jenkins Job
Maven goals: release-start release-finish -Dsomething -Delse
And is there a way tell it to automatically build from the latest -SNAPSHOT version, e.g. if the version is 1.2.3-SNAPSHOT
it would build release-1.2.3
.
Otherwise, is there a maven plugin that builds releases according the git flow branching model (i.e. build from develop
and create a new release branch named release-x.y.z
).
We never found a way to get this to work via a plugin or maven goal in Jenkins.
Our solution ended up with a bash
script that did git flow release start <version>
, maven release process, git flow release finish <version>
and other things (git pull on develop
and master
at very start, git push
and slack notification at very end).
这篇关于Git流程:如何在Jenkins中配置一键式发布流程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!