Git Flow Process for versioning AEM releases

Maven plugin needed for this set up:

<plugin>
   <groupId>com.amashchenko.maven.plugin</groupId>
   <artifactId>gitflow-maven-plugin</artifactId>
   <version>1.14.0</version>
   <configuration>
       <installProject>false</installProject>
       <verbose>false</verbose>
       <keepBranch>true</keepBranch>
       <skipTestProject>true</skipTestProject>
       <gitFlowConfig>
           <productionBranch>master</productionBranch>
           <developmentBranch>develop</developmentBranch>
           <featureBranchPrefix>feature/</featureBranchPrefix>
           <releaseBranchPrefix>release/</releaseBranchPrefix>
           <hotfixBranchPrefix>hotfix/</hotfixBranchPrefix>
           <versionTagPrefix></versionTagPrefix>
           <origin>origin</origin>
       </gitFlowConfig>
       <commitMessages>
       </commitMessages>
   </configuration>
</plugin>

Make sure the master branch has the latest deployed in prod and the develop branch is used for the next release. 

Few days prior to the release, run the following command on the latest from the develop branch:

mvn gitflow:release-start

This command will ask for the next build number

This will create a new release branch with the build versions updated in all the pom.xml files in the project.

Use the newly created release/1.0.3 branch to deploy code to STAGE. 

NOTE: Since it’s not a snapshot version, any java code changes after installing the branch to STAGE will require us to uninstall the ui.apps package and then install the new package. 

Once the release is deployed to production, we need to run the following command on the release branch:

mvn gitflow:release-finish

The above command will do the following:

  1. Merge the release branch into master
  2. Tag the master branch with the release number
  3. Update the develop branch to the next snapshot version. 
  4. Push all the changes to develop and master. 

NOTE: Since the `develop` branch still has the snapshot version, there will be no issues with code deployment in the local environment. 

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *