ERM Backend modules release procedure

Github

  • Firstly, create a branch for the version you are about to release from master, ie `release/3.0.x`.
    • If releasing a bugfix/hotfix, then create branch from relevant version tag: `git checkout -b release_3.0.1 v3.0.0`
    • Then cherry pick relevant commits into the release branch: `git cherry-pick <commit hash>` and check they still pass integration tests.
  • Then update the changelog `NEWS.md` file to reflect all JIRA issues solved since the previous release.
    • Make sure to remove (IN PROGRESS) from relevant section, and replace with today's date.
    • Also ensure you remove `-SNAPSHOT` from the version number if it was there previously.
An easy way is to go to this page and filter by date updated/component. Also check the commits for the module to see if any other issues are referenced there.
When you have a parent issue and subtasks, they should appear in the changelog in a nested form, like so:

Changelog example

* ERM-904 Update tooling and framework
* ERM-906 Update licenses to Grails 4
* ERM-909 Update docker image to Java 11
  • Commit changelog changes and push up to github
    • If doing a bugfix, first increment version number by 1 on patch, ie 3.0.0 -> 3.0.1, then raise a PR and merge to long life release branch, ie release_v3.0.x.
    • DO NOT MERGE BACK TO MASTER
  • Go to your branch on github, select "releases" on the left hand side and "draft new release". Make sure the Target is set to your release branch, and the tag is of the form `vx.y.z`, ie `v3.0.0` or `v5.2.1` etc. Give the release a name, `Version 3.0.0` and fill in the explanation with the changes you already made to the changelog, along with the header:

Release information

## 3.0.0 2020-10-14
* ERM-1046 Non-phrase searching support for licenses
* ERM-967 Add "Note" to Organisation link in Licenses
* ERM-904 Update tooling and framework
   * ERM-906 Update licenses to Grails 4
   * ERM-909 Update docker image to Java 11
* ERM-828 Add support for "Alternative name" for licenses
* ERM-975 Licenses: Use /organizations/ instead of /organizations-storage/
* ERM-742 Custom properties: Backend validation not working
for example. Then click "publish release".
  • Raise a PR and merge into master (Ensure release JIRA issue is in PR)
    • **DON'T SQUASH MERGE**, this ensures commit hashes are preserved and your tag is valid on master too
    • **Don't  delete the branch afterwards.**
    • DO NOT DO THIS FOR BUGFIX
  • Once that is merged, create a new PR to increment version number in gradle.properties, and add new section in `NEWS.md` for (IN PROGRESS) work and merge that
    • Ensure release JIRA issue is in PR.
    • If `-SNAPSHOT` was previously on the version, add that in as well
    • DO NOT DO THIS FOR BUGFIX
find your new tag, and select "Build now" from the dropdown menu next to the tag name. (Alternatively select tag and then "Build now" from the menu on the left hand side of the screen)

Slack release message

with a link to the github tagged release page.
  • Move onto JIRA release tasks

JIRA

  •  Change name of JIRA issue to reflect released version number
  • Set to 'closed'
  • Unassign whoever is currently assigned to the issue