user320550
user320550

Reputation: 1175

Creating release tag with Maven/Jenkins/Git

I'm using Jenkins, Git and Maven as part of my development process. I have two branches develop and master. As usual I do my development on develop, test it and merge it to master for the jar to be published.

I'm using Jenkins to deploy my snapshots/release jars to our Nexus repository. When I deploy/publish the release jar (one without -SNAPSHOT) I would like to create a release TAG in my GitHub repo, while I want to avoid that while deploying my snapshots.

I went through the posts at http://www.dev9.com/article/2014/9/java-release-process-with-continuous-delivery and https://axelfontaine.com/blog/final-nail.html to get some idea.

My questions are the following:

Upvotes: 2

Views: 7540

Answers (1)

drgn
drgn

Reputation: 1140

Basically you need the following plugin: http://maven.apache.org/maven-release/maven-release-plugin/

The plugin do the following:

  1. remove the -SNAPSHOT, and commit
  2. Tag the version in Git, commit
  3. Increment the version number and add -SNAPSHOT, commit
  4. Push those change

What it look like in jenkins (configuration of the job) jenkins

Upvotes: 4

Related Questions