-
Notifications
You must be signed in to change notification settings - Fork 75
Releasing DROID
This details the steps required to release DROID.
- Update DROID with the latest Signatures
- Create release note
- Update Documentation
- Build DROID
- Configure Maven to Release to Maven Central
- Release DROID
- Publish to Maven Central
- Update the github website
-
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
-
Update the DROID tests
-
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
-
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>
- git commit -a && git push
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.
- Please add/update changelog in the following files:
droid-binary/bin/ChangeLog
droid-help/src/main/resources/Web pages/Whats New.html
- Run mvn javadoc:javadoc. Fix all raised issues.
-
Get a fresh copy of the GitHub repo: git clone [email protected]:digital-preservation/droid.git
-
Clean out any forward dependencies from maven repo: rm -rf ~/.m2/repository/uk/gov/nationalarchives
-
mvn clean install
The build might take some time (like 1h30) while running the dependency check as mentioned there. Just be patient.
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.
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")
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>
- 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).
-
Finally, run mvn release:perform
-
Your release artifacts will now be in the appropriate target folders and a copy will have been pushed to then Maven Central Staging repository.
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
- To release your artifacts, open your favorite browser and go to Nexus UI with address: https://oss.sonatype.org
- Login to Nexus UI
- Go to the Staging repositories page
- There should be a repository with the recent upload of artifacts, Click "Close" to close the repository
- If it is closed successfully and all rules are met, you will see a "Release" button on the toolbar
- 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
- 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.