vikingsteve vikingsteve - 1 year ago 313
Git Question

Git flow: How to configure a one-click release process in Jenkins?

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
it would build

Otherwise, is there a maven plugin that builds releases according the git flow branching model (i.e. build from
and create a new release branch named

Answer Source

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).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download