Release Process Documentation
This document outlines the standard process for releasing Maven-based projects in the path-drc.
Prerequisites
Ensure you have the appropriate permissions to push changes and create releases in the relevant repositories.
Install the necessary tools:
Java JDK (version required by the project)
Apache Maven (matching the project's setup)
Git
Access to the project’s artifact repository (e.g., Maven Central, GitHub Packages, or internal Nexus/Artifactory)
Ensure all credentials are configured (settings.xml, etc.)
Projects and Release Order
The following Maven projects must be released in the specified order due to their dependency relationships:
openmrs-content-path-drc
Depends on the latest SNAPSHOT or released version of openmrs-module-drcreportspath-drc-emr
Depends on the latest SNAPSHOT or released version of openmrs-content-path-drc
General Release Steps
For each project, follow these steps:
1. Prepare for Release
Ensure all dependencies are up to date and released.
Update the release notes.
Communicate the upcoming release to the team.
2. Update Versions and Dependencies for the Release (Release Commit)
Update the project's version from
1.x.x-SNAPSHOTto1.x.xinpom.xml.For dependent projects, update their dependencies to use the just-released versions (e.g.,
1.x.x).Example:
openmrs-content-path-drcmust reference the released version ofopenmrs-module-drcreports.path-drc-emrmust reference the released version ofopenmrs-content-path-drc.
For
path-drc-emronly: (Imporntant)Update the
.envfile in the repository to setTAG=1.x.x(replace with the current release version).
Stage and commit all these changes together in a single commit:
git add pom.xml # For path-drc-emr only: also add the .env file git add .env git commit -m "Release 1.x.x" git push origin main
3. Tag the Release
Tag the release:
git tag v1.x.x git push origin v1.x.x
4. Bump Project and Dependency Versions to Next SNAPSHOT
Update the project version to the next development SNAPSHOT (e.g.,
1.y.y-SNAPSHOT).For dependent projects, update their dependencies to the next SNAPSHOT version as well:
openmrs-content-path-drcshould depend on the next SNAPSHOT ofopenmrs-module-drcreportspath-drc-emrshould depend on the next SNAPSHOT ofopenmrs-content-path-drc
Stage and commit all these changes:
git add pom.xml git commit -m "Prepare for next development iteration" git push origin main
5. Build, Deploy, and Release
Note: The Build, Deploy, and Release step is handled automatically by CI upon push and tag actions.
6. Post-Release
Announce the release to stakeholders (email, Slack, etc.).
Update documentation as needed.
Example Workflow
Suppose you are releasing version 1.0.0 for all projects, and the next development version will be 1.1.0-SNAPSHOT:
For
openmrs-module-drcreports:Update version to
1.0.0inpom.xml.Commit as "Release 1.0.0".
Tag
v1.0.0.Update version to
1.1.0-SNAPSHOTinpom.xml.Commit as "Prepare for next development iteration".
For
openmrs-content-path-drc:Update dependency on
openmrs-module-drcreportsto1.0.0and set own version to1.0.0.Commit as "Release 1.0.0".
Tag
v1.0.0.Update dependency on
openmrs-module-drcreportsto1.1.0-SNAPSHOTand set own version to1.1.0-SNAPSHOT.Commit as "Prepare for next development iteration".
For
path-drc-emr:Update dependency on
openmrs-content-path-drcto1.0.0and set own version to1.0.0.Update
.envto setTAG=1.0.0.Commit as "Release 1.0.0".
Tag
v1.0.0.Update dependency on
openmrs-content-path-drcto1.1.0-SNAPSHOTand set own version to1.1.0-SNAPSHOT.Commit as "Prepare for next development iteration".
Release Checklist
Notes
Always group all version and dependency updates related to a release in a single commit, and all SNAPSHOT bumps in a separate commit.
Adjust commands and steps for each Maven project as necessary.
For multi-module projects or those with dependencies between modules, ensure the release order is maintained.
Update this document as the process evolves.