Skip to content

Release process for v5

Mahmoud Ben Hassine edited this page Feb 22, 2023 · 21 revisions

Overview of the release process:

  • Part 1: Pre release tasks
  • Part 2: Release to Artifactory
    • Part 2.1: Stage the release on Artifactory
    • Part 2.2: Promote the release to Artifactory
  • Part 3: Release to Maven Central
    • Part 3.1: Stage the release on Sonatype
    • Part 3.2: Promote the release to Maven Central
  • Part 4: Post release tasks
    • Part 4.1: Create git tag
    • Part 4.2: Update documentation
    • Part 4.3: Announce the release
  • Part 5: Rolling back a release

Part 1: Pre release tasks

  1. Get the latest changes from the upstream repository of the branch being released.
  2. Check if pom.xml refers to any snapshot/milestone dependencies. Later in the release process, the enforcer plugin will check for snapshots, but not for milestones. So it is better to do the verification at this point.

Part 2: Release to Artifactory

Part 2.1: Stage the release on Artifactory

  1. Go to Github Actions: https://github.com/spring-projects/spring-batch/actions.
  2. Run the "Artifactory Staging" workflow by providing the version to release. This will deploy the release to https://repo.spring.io/libs-staging-local/org/springframework/batch
  3. Check uploaded jars in http://repo.spring.io/libs-staging-local/org/springframework/batch and do a smoke test with the staged version (check the integrity of the artifacts to see if jars are not corrupted or empty, etc).

Part 2.2: Promote the release to Artifactory

  1. TODO: check if there is a Github Action that promotes artifacts from libs-staging-local to libs-milestone-local (for milestones) and libs-release-local (for releases), otherwise develop one or use a shell script for that.
  2. Check uploaded jars in http://repo.spring.io/libs-milestone-local/ or http://repo.spring.io/libs-release-local/

Note: The process ends here for milestone releases

Part 3: Release to Maven Central

Part 3.1: Stage the release on Sonatype

  1. Go to Github Actions: https://github.com/spring-projects/spring-batch/actions.
  2. Run the "Sonatype Staging" workflow by providing the version to release. This will download the artifacts from the Artifactory staging repository, GPG sign them and upload them to a fresh Sonatype staging repository. The Sonatype's repository ID will be printed at the end of the workflow by the "Print staging repository Id" step. This staging repository Id is needed for the next step.

Part 3.2: Promote the release to Maven Central

  1. Go to https://s01.oss.sonatype.org/ and login with springsource account.
  2. In the Staging Repositories tab, select the staging repository with the ID from previous step and check its content/activity:
sonatype

If everything looks good, the staging repository can be closed and released from the UI. Otherwise, it should be dropped.

NB: If an extra check should be done from this staging repository, then the repository should be closed to be able to import jars from it and test them. Otherwise the content will not be visible.

Part 4: Post release tasks

Part 4.1: Create git tag

None of the previous Github Actions changes the version in the code and pushes the changes to the upstream repository. The version change is done manually on purpose. At this point, the release should have been staged, tested and promoted to Artifactory and Maven Central. It is now safe to change the version in the code and push it to the upstream repository. From the root directory of the project, run the following commands (change the version number accordingly, no need to create a variable, substitute it, etc):

$./mvnw versions:set -DgenerateBackupPoms=false -DnewVersion=5.0.1
$git commit -a -m "Release version 5.0.1"
$git tag -a v5.0.1 -m "Release version 5.0.1"
$git push upstream v5.0.1

NB: The "v" prefix in the tag name is important, see https://github.com/spring-projects/spring-batch/issues/4183.

Part 4.2: Update documentation

  1. Go to Github Actions: https://github.com/spring-projects/spring-batch/actions.
  2. Run the "Documentation Upload" workflow by providing the version to release. This will generate a distribution of the documentation (java docs, reference docs, etc) and upload it to the documentation server where needed.

Part 4.3: Announce the release

  1. Generate the release notes and create a release on Github.
  2. Update the project's page on Sagan with the latest release/snapshot versions.
  3. Write a release announcement blog post.
  4. Tweet about the release using the @SpringBatch handle.
  5. Post a message in the #spring-release slack channel.

Part 5: Rolling Back a release

If anything goes wrong before promoting to Maven Central:

  1. Delete the version from Artifactory.
  2. Delete the release tag from git locally and remotely.
  3. Revert the version in pom.xml and push the change to the upstream repository.
  4. Restart the release process.
Clone this wiki locally