Release Process Documentation

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:

  1. openmrs-module-drcreports

  2. openmrs-content-path-drc
    Depends on the latest SNAPSHOT or released version of openmrs-module-drcreports

  3. path-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-SNAPSHOT to 1.x.x in pom.xml.

  • For dependent projects, update their dependencies to use the just-released versions (e.g., 1.x.x).

    • Example:

      • openmrs-content-path-drc must reference the released version of openmrs-module-drcreports.

      • path-drc-emr must reference the released version of openmrs-content-path-drc.

  • For path-drc-emr only: (Imporntant)

    • Update the .env file in the repository to set TAG=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-drc should depend on the next SNAPSHOT of openmrs-module-drcreports

    • path-drc-emr should depend on the next SNAPSHOT of openmrs-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:

  1. For openmrs-module-drcreports:

    • Update version to 1.0.0 in pom.xml.

    • Commit as "Release 1.0.0".

    • Tag v1.0.0.

    • Update version to 1.1.0-SNAPSHOT in pom.xml.

    • Commit as "Prepare for next development iteration".

  2. For openmrs-content-path-drc:

    • Update dependency on openmrs-module-drcreports to 1.0.0 and set own version to 1.0.0.

    • Commit as "Release 1.0.0".

    • Tag v1.0.0.

    • Update dependency on openmrs-module-drcreports to 1.1.0-SNAPSHOT and set own version to 1.1.0-SNAPSHOT.

    • Commit as "Prepare for next development iteration".

  3. For path-drc-emr:

    • Update dependency on openmrs-content-path-drc to 1.0.0 and set own version to 1.0.0.

    • Update .env to set TAG=1.0.0.

    • Commit as "Release 1.0.0".

    • Tag v1.0.0.

    • Update dependency on openmrs-content-path-drc to 1.1.0-SNAPSHOT and set own version to 1.1.0-SNAPSHOT.

    • Commit as "Prepare for next development iteration".


Release Checklist

 

All tests pass locally and in CI.
CHANGELOG and documentation are updated.
All dependencies are released and available.
No unresolved critical issues in the issue tracker.
Artifacts deploy successfully to the repository
[ ] Release is tagged in Git.

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.