Skip to content

Commit

Permalink
OPENNLP-1492 - Updates the Release process documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rzo1 committed Nov 22, 2023
1 parent 4ea9c6a commit 6690f85
Showing 1 changed file with 133 additions and 28 deletions.
161 changes: 133 additions & 28 deletions src/main/jbake/content/release.ad
Original file line number Diff line number Diff line change
Expand Up @@ -49,41 +49,115 @@ Examples of adding your key to this file:
+
----
svn co https://dist.apache.org/repos/dist/release/opennlp/
svn commit -m"Added Key for <name>" KEYS
svn commit -m "Added Key for <name>" KEYS
----
- Create a maven `settings.xml` to publish to `repository.apache.org`. An example configuration:
+
----
<server>
<id>apache.releases.https</id>
<username>Your Apache Username</username>
<password>Your Apache Password</password>
</server>
<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd"
xmlns="http://maven.apache.org/SETTINGS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<servers>
<server>
<id>apache.snapshots.https</id>
<username>your-asf-ldap</username>
<password>your-asf-ldap-password</password>
</server>
<server>
<id>apache.releases.https</id>
<username>your-asf-ldap</username>
<password>your-asf-ldap-password</password>
</server>
<server>
<id>apache.dist.https</id>
<username>your-asf-ldap</username>
<password>your-asf-ldap-password</password>
</server>
</servers>
<profiles>
<profile>
<id>apache-gpg</id>
<properties>
<gpg.keyname>your-gpg-code-signing-key-fingerprint</gpg.keyname>
</properties>
<repositories>
<repository>
<id>apache.dist.https</id>
<url>https://dist.apache.org/repos/dist</url>
</repository>
</repositories>
</profile>
</profiles>
</settings>
----

- In case you are running on a headless system, it might be necessary to set the following export before starting with the release preparation.
+
----
export GPG_TTY=$(tty)
----



## Release Steps

- Checkout the Apache OpenNLP main branch: `git clone git@github.com:apache/opennlp.git`
- Execute a complete test (it can take several hours): `mvn test -DOPENNLP_DATA_DIR=/path/to/opennlp-test-data/ -Peval-tests`
- Do a trial build: `mvn package -Papache-release`
- Prepare the release: `mvn release:prepare` Answer the questions appropriately. The tag name format should be *opennlp-x.y.z*.
This command creates and pushes two new commits to the repository to reflect the version changes. It also tags the release.
- (Optional) Execute a complete test (it can take several hours): `mvn test -DOPENNLP_DATA_DIR=/path/to/opennlp-test-data/ -Peval-tests`
- Check the current results of the eval build on the ASF Jenkins CI: https://ci-builds.apache.org/job/OpenNLP/job/eval-tests/
- Do a trial build: `mvn package -Papache-release,apache-gpg`
- Switch to a new branch with a format like *rel-opennlp-x.y.z.*.
- Prepare the release: `mvn release:prepare -Papache-gpg` Answer the questions appropriately. The tag name format should be *opennlp-x.y.z*.
This command creates and pushes two new commits to the repository to reflect the version changes. It also tags the release and pushes the branch.
- Start an eval build for the tag via https://ci-builds.apache.org/job/OpenNLP/job/eval-tests-releases/ (build can take several hours)

### Successful Maven Release Preparation

#### Perform the Release

Perform the release: `mvn release:perform`
- Perform the release: `mvn release:perform -Papache-gpg`
- This creates a staged repository at https://repository.apache.org/#stagingRepositories
- Check the staged repository and if all looks well, close the staging repository but do *not* promote or release it at this time.
- The build results are in `opennlp/target/checkout/target`. Do not modify or delete these files.

##### Put the artifacts to dist/dev

This creates a staged repository at https://repository.apache.org.
Check the staged repository and if all looks well, close the staging repository but do *not* promote or release it at this time.
The build results are in `opennlp/target/checkout/target`. Do not modify or delete these files.
- Next, checkout the svn dist dev space from https://dist.apache.org/repos/dist/dev/opennlp/
- Create a new folder `opennlp-x.y.z`.
- Add the files from `opennlp/target/checkout/target` to this folder.
- Commit the change set to the dist area. Check that the files are present in https://dist.apache.org/repos/dist/dev/opennlp/opennlp-x.y.z

#### Check the Release Artifacts

Perform basic checks against the release binary:

- Check signature of generated artifacts.
- Check signature of generated artifacts. This can be done like that:
+
----
#!/bin/bash

mkdir /tmp/test
cd /tmp/test
curl -s -O https://dist.apache.org/repos/dist/release/opennlp/KEYS
curl -s -O https://dist.apache.org/repos/dist/dev/opennlp/opennlp-x.y.z/apache-opennlp-x.y.z-src.tar.gz
curl -s -O https://dist.apache.org/repos/dist/dev/opennlp/opennlp-x.y.z/apache-opennlp-x.y.z-src.tar.gz.asc

echo "
list keys
"
gpg --homedir . --list-keys

echo "
import KEYS file
"
gpg --homedir . --import KEYS

echo "
verify signature
"
gpg --homedir . --output apache-opennlp-x.y.z-src.tar.gz --decrypt apache-opennlp-x.y.z-src.tar.gz.asc
----

- Check presence and appropriateness of `LICENSE`, `NOTICE`, and `README` files.

#### Create a VOTE Thread
Expand All @@ -97,27 +171,58 @@ Hi folks,

I have posted a [Nth] release candidate for the Apache OpenNLP [version] release and it is ready for testing.

The distributables can be downloaded from:
https://repository.apache.org/content/repositories/orgapacheopennlp-[REPO_NUM]/org/apache/opennlp/opennlp-distr/[VERSION]/

The release was made from the Apache OpenNLP [VERSION] tag at:
https://github.com/apache/opennlp/tree/opennlp-[VERSION]

To use it in a maven build set the version for opennlp-tools or opennlp-uima to [VERSION] and add the following URL to your settings.xml file:
https://repository.apache.org/content/repositories/orgapacheopennlp-[REPO_NUM]
<Add a summary to highlight notable changes>

The release was made using the OpenNLP release process, documented on the website:
https://opennlp.apache.org/release.html

Please vote on releasing these packages as Apache OpenNLP [VERSION]. The vote is open for at least the next 72 hours.
Maven Repo:
https://repository.apache.org/content/repositories/orgapacheopennlp-XXXX

Only votes from OpenNLP PMC are binding, but everyone is welcome to check the release candidate and vote.
<repositories>
<repository>
<id>opennlp-y.x.z-rc1</id>
<name>Testing OpenNLP x.y.z release candidate</name>
<url>
https://repository.apache.org/content/repositories/orgapacheopennlp-XXXX
</url>
</repository>
</repositories>

Binaries & Source:

https://dist.apache.org/repos/dist/dev/opennlp/opennlp-x.y.z

Tag:

https://github.com/apache/opennlp/releases/tag/opennlp-x.y.z

Release notes:

<Add link to the Jira release notes>

The results of the eval tests for the aforementioned tag can be found
here: https://ci-builds.apache.org/job/OpenNLP/job/eval-tests-releases/<add-link-to-build>

Reminder: The up-2-date KEYS file for signature verification can be
found here: https://dist.apache.org/repos/dist/release/opennlp/KEYS

Please vote on releasing these packages as Apache OpenNLP x.y.z The
vote is open for at least the next 72 hours.

Only votes from OpenNLP PMC are binding, but everyone is welcome to
check the release candidate and vote.
The vote passes if at least three binding +1 votes are cast.

[ ] +1 Release the packages as Apache OpenNLP [VERSION]
[ ] -1 Do not release the packages because...
Please VOTE

[+1] go ship it
[+0] meh, don't care
[-1] stop, there is a ${showstopper}

Thanks!

>>Your-Name<<
----

## After a Successful Vote
Expand All @@ -137,7 +242,7 @@ Commit the distribution via SVN to https://dist.apache.org/repos/dist/release:
----
svn co https://dist.apache.org/repos/dist/release/opennlp/ dist
# check if the KEYS file contains your key, if not, update it
# copy opennlp/target/checkout/target/apache-opennlp* to dist/opennlp-<VERSION>
# copy from the dist/dev area to to dist/opennlp-<VERSION>
svn commit --username <username> -m "Adding OpenNLP <version>"
----

Expand Down

0 comments on commit 6690f85

Please sign in to comment.