General Git Journey By GitLab and Maven

Setting up Maven Repository

Develop and Feature Branches

git checkout -b feature/abc0001

Feature Branch Pipeline

mvn pmd:check
mvn spring-javaformat:apply

Code Review

Deploy to QA Environment

Setting up Maven Release Plugin in POM.XML

<scm>  <developerConnection>scm:git:ssh://git@gitlab.com:/projectname.git</developerConnection>
<tag>HEAD</tag>
</scm>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<tagNameFormat>@{project.version}</tagNameFormat>
<autoVersionSubmodules>true</autoVersionSubmodules>
<releaseProfiles>releases</releaseProfiles>
</configuration>
</plugin>
  • delete the release descriptor (release.properties)
  • delete any backup POM files
  • perform some checks — there should be no uncommitted changes and the project should depend on no SNAPSHOT dependencies
  • change the version of the project in the pom file to a full release number (remove SNAPSHOT suffix) in our example 0.0.1
  • run the project test cases
  • commit and push the changes
  • create the tag out of this non-SNAPSHOT versioned code
  • increase the version of the project in the pom in our example 0.0.2-SNAPSHOT
  • commit and push the changes
  • checkout release tag from SCM
  • build and deploy released code

What to do when QA finds bugs in the release branch?

Staging Environment

Production Environment

Unlisted

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store