Skip to content

Releasing DROID

Saurabh Parkhi edited this page May 16, 2024 · 17 revisions

This details the steps required to release DROID.

Update DROID with the latest Signatures

  1. Get the latest PRONOM Signature file (e.g. DROID_SignatureFile_v65.xml) and replace the existing Signature files in droid-results/src/main/resources and droid-command-line/src/test/resources/signatures

  2. Update the DROID tests

  3. Get the latest PRONOM Containers Signature file (e.g. container-signature-20120829.xml) and replace the existing Containers Signature file in droid-container/src/main/resources

  4. Ensure that the SCM sections of the pom.xml files use the SSH URIs and not the HTTPS URIs. e.g.

<scm>
 <connection>scm:git:[email protected]:digital-preservation/droid.git</connection>
 <developerConnection>scm:git:[email protected]:digital-preservation/droid.git</developerConnection>
 <url>scm:git:[email protected]:digital-preservation/droid.git</url>
</scm>
  1. git commit -a && git push

Update the bundled JRE to latest release of the same version

Create release note

here are the tool and configuration used to create the release note:

https://github.com/spring-io/github-release-notes-generator

application.yaml

releasenotes:
  github:
    organization: "digital-preservation"
    repository: "droid"
  sections:
  - title: "Enhancements"
    emoji: ":star:"
    labels: ["enhancement"]
  - title: "Bugs"
    emoji: ":beetle:"
    labels: ["bug"]
  - title: "Security, Test"
    emoji: ":computer:"
    labels: ["security","test"]
  - title: "Dependency updates"
    emoji: ":arrow_up:"
    labels: ["dependencies"]

command line to run on linux:

java -jar github-release-notes-generator.jar --spring.config.location=application.yaml 6.5 release-notes.md

A couple of useful linux shell commands to help with the editing (extract issues, PR, sort contributors) :

cat release-notes.md | grep -v "/pull/"
cat release-notes.md | grep -v "/issues/"
cat release-notes.md | grep "\[@" | sort

Please highlight in bold the most important features added to make the changelog easier to read.

Update Documentation

  1. Please add/update changelog in the following files:
  • droid-binary/bin/ChangeLog
  • droid-help/src/main/resources/Web pages/Whats New.html
  1. Run mvn javadoc:javadoc. Fix all raised issues.

Build DROID

  1. Get a fresh copy of the GitHub repo: git clone [email protected]:digital-preservation/droid.git

  2. Clean out any forward dependencies from maven repo: rm -rf ~/.m2/repository/uk/gov/nationalarchives

  3. mvn clean install

The build might take some time (like 1h30) while running the dependency check as mentioned there. Just be patient.

Configure Maven to Release to Maven Central

Setup account on Maven Central

To publish to Maven Central you should follow steps 1 through 5 from here: https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide

You will have to

  • create a JIRA account with your nationalarchives email address if you have
  • create a ticket to request access to nationalarchives repository (like I did here)
  • get a colleague who is already registered to confirm your request on the JIRA ticket, if this is not done within 5 days, the ticket is automatically closed

NOTE: As of Droid 6.7.0, We release using a central maven account for The National Archives. You should use that account instead of your own personal account to release any artifacts to maven central.

Setup GPG key

to create a gpg key if you don't have one already, see https://central.sonatype.org/pages/working-with-pgp-signatures.html. The associated password will be requested when performing the release with maven.

  • generate the key gpg --gen-key
  • get your key id gpg --list-keys
  • retrieve public key gpg --export -a $keyid
  • copy paste public key on web interface of key server: the "Submit a Key" button on https://keyserver.ubuntu.com (I had no success doing it through CLI even after waiting a couple of hours, as I was told: "The public key servers are regularly overloaded and it can take a long time for the keys you publish to propagate")

Update Maven settings file

You then need to modify your Maven settings file (i.e. ~/.m2/settings.xml) to contain the following:

<settings>
  ...
  <servers>
    <server>
      <id>sonatype-nexus-snapshots</id>
      <username>your-jira-id</username>
      <password>your-jira-pwd</password>
    </server>
    <server>
      <id>sonatype-nexus-staging</id>
      <username>your-jira-id</username>
      <password>your-jira-pwd</password>
    </server>
  </servers>
  ...
</settings>

Release DROID

  1. Run mvn release:prepare. The options presented to you on the console should make sense, and if so you can go with all the defaults.
  • If 1. does not go well, then run mvn release:rollback, figure out what went wrong, start a new PR branch, and please allow me to share with you all my compassion (been there).
  1. Finally, run mvn release:perform

  2. Your release artifacts will now be in the appropriate target folders and a copy will have been pushed to then Maven Central Staging repository.

Publish to Maven Central

1. To release the artifacts to Maven Central from the staging repository, simply follow the instructions in section 8a. Release It, here: https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-8a.ReleaseIt

  1. To release your artifacts, open your favorite browser and go to Nexus UI with address: https://oss.sonatype.org
  2. Login to Nexus UI
  3. Go to the Staging repositories page
  4. There should be a repository with the recent upload of artifacts, Click "Close" to close the repository
  5. If it is closed successfully and all rules are met, you will see a "Release" button on the toolbar
  6. Click the "Release" button to release the artifacts to maven central

If there is an error when closing the repository, (e.g. a rule violation), you will have to "Drop" the repository, address the issue and redo the steps

Update the github website

  1. The github website is created from the contents of a branch called gh-pages. Once a new release has taken place, this branch should be updated to reflect the latest changes so that the github website is kept up to date.

update documentation at following places:

  1. https://www.nationalarchives.gov.uk/documents/information-management/droid-user-guide.pdf
  2. https://www.nationalarchives.gov.uk/information-management/manage-information/policy-process/digital-continuity/file-profiling-tool-droid/