Release Process after R8 (draft)

Lifecycle

  • release begins
  • features are developed
  • finished features are published in next release branch
  • cutoff date: the date where the current release is finalized
    • all projects have to have a release branch
    • all release branches have to compile and have to be tested by developers
    • each artifact is released
  • release has been finished

Version numbers

The version of each project will be changed to represent the current release, e.g. 8.0.0-SNAPSHOT for a SNAPSHOT version or 8.0.0 for the release version of R8.

The major version represents exactly the Release version; the minor version is a counter for each intermediate release (complete software stack and new branch); the tiny version represents the bugfix releases (single project on existing branch).

General Scenario

Assume the following situation: R9 has just been finished and is already released in version 9.0.0; features for R10 are currently developed.
  • all versions in trunk are 9.1.0-SNAPSHOT (in preparation an intermediate release has to be done)
  • all versions in R9 branch are 9.0.1-SNAPSHOT
  • if R9.1 branch exists (after intermediate release): all versions in R9.1 branch are 9.1.1-SNAPSHOT (in preparation for a bugfix)
In the rare case, that a bug had happened and was reported, it has to be fixed in the trunk and in the latest R9 branch. The R9 branch will then be re released in version 9.0.1.

In the case, that it is decided to do an intermediate release, all trunks are branched to R9.1. The R9.1 branch is then SNAPSHOT deployed in version 9.1.0-SNAPSHOT and released in version 9.1.0.

At the latest of the cutoff date, each project is branched from trunk to R10 (with version number 10.0.0-SNAPSHOT). R10 branches are now SNAPSHOT deployed and released in version 10.0.0, tagged and published in the nexus, also the R10 branch has now the version 10.0.1-SNAPSHOT. Now each project on the trunk has to be updated to 10.1.0-SNAPSHOT and have to be SNAPSHOT deployed again.

This means:
  • versions:
    • in trunk there are never release versions
    • in branches
      • before the release: there are only SNAPSHOT version of the to be released version (x.y.z-SNAPSHOT)
      • after release: there are only SNAPSHOT versions for the next bugfix (x.y.1-SNAPSHOT)
        • dependency versions are fixed (x.y.0)
  • developing
    • the developing of features occures only in trunk
    • bugfixes are resolved in branch and trunk
      • bugfixes are only released from the branch in the next bugfix version (e.g. 9.0.1 for the first bugfix in R9)
    • the trunk can be branched as often as needed to the next release branch (until the cutoff date, afterwards its forbidden)
      • be carefull with mavens release:branch plugin, if the branch already exists the code will be copied to a subfolder instead of overriding the existing branchs code
  • deployment
    • SNAPSHOTs are only deployed from trunk
    • releases are only released from branch

Release process for developers

  • before cutoff date:
    • develop features as usual
    • follow preparation steps described here, optionally create SNAPSHOT deploy
    • publish project to the next release branch based on the next release version (intermediate or final release)
      • ensure the branch doesn't exist, otherwise maven will create a subfolder with the project in it
      • mvn release:branch -DbranchName=Rx.y -DupdateWorkingCopyVersions=false -DupdateBranchVersions=true -DreleaseVersion=x.y.0-SNAPSHOT
        • where x is the release name
        • where y is the intermediate release name
        • e.g. intermediate: mvn release:branch -DbranchName=R8_1 -DupdateWorkingCopyVersions=false -DupdateBranchVersions=true -DreleaseVersion=8.1.0-SNAPSHOT
        • e.g. main: mvn release:branch -DbranchName=R9 -DupdateWorkingCopyVersions=false -DupdateBranchVersions=true -DreleaseVersion=9.0.0-SNAPSHOT
  • after cutoff date:

Release itself (done by release engineer)

The release itself can now be done by a single person.

The release is done on the Rx.y branches created by the developers
  • each project is released in the reactor build order (maybe a script is provided to check out each Rx-branch and use the reactor to release)
  • dependency versions of all projects have to be updated to Rx.y.0-SNAPSHOT
  • Commit and push to Git if changes have been performed to the POM while updating dependencies.
  • in general the same process as as before (without the preparation steps), see here, in short:
    • mvn clean deploy
      • build the latest SNAPSHOT version to test if all artifacts compile together
    • mvn release:prepare-with-pom
      • use the current release version for each dependency (e.g. x.y.0) for the release and the next development iteration
      • use the next tiny snapshot version for your own artifact (e.g. x.y.1-SNAPSHOT)
      • the tag for the current release will be created
    • mvn release:perform
      • the tag is checked out, build and published to the nexus
  • update the trunk to the next development version (each project with its dependencies)
    • Next version is always <x>.<y+1>.0-SNAPSHOT, even if there is no additional intermediate release currently planned, so e.g. it will be 8.2.0-SNAPSHOT after release of 8.1.0, even if the next currently planned release is 9.0.0
    • commit and push to Git

Release as Graphic

           +
           |  +--------------+                                            +--------------+
     trunk |  |8.1.0-SNAPSHOT|----------------------------+-------------->|9.1.0-SNAPSHOT|
           |  +--------------+                            ^               +--------------+
           |          | SNAPSHOT deploy            increase versions       SNAPSHOT deploy
+------------------------------------------------------------------------------------------+
           |          | branching
           |          |           +--------------+     +-----+         +--------------+
 R9 branch |          +---------->|9.0.0-SNAPSHOT|---->|9.0.0|-------->|9.0.1-SNAPSHOT|
           |                      +--------------+     +-----+         +--------------+
           |                                              |               |
+------------------------------------------------------------------------------------------+
           |                                              | release       | release
           |                                              |               |
           |                                              |    +-----+    |    +-----+
       tag |                                              +--->|9.0.0|    +--->|9.0.1|
           |                                                   +-----+         +-----+
           +
Topic revision: r18 - 09 Jan 2020, BenjaminPeter
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback