This procedure is valid only on branch-3.5.

During 3.5 development we migrated from ANT to Maven, but we were not using the Maven Release Plugin yet.

If you are going to release 3.6 or newer please follow the current procedure.

Setting up the signing keys

Before you do a release you'll need a signing key that is registered with apache. If you already have one, you can skip this section. Otherwise, here are the steps to do:

  1. use gpg2 --gen-key to generate a new key. Make sure that the key size is 4096 bits, the key doesn't expire, and use CODE SIGNING KEY for the comment.
  2. Now you need to register your key at http://pgp.mit.edu/ using the output of gpg --armor --export <keyid>
  3. Add your key to the KEYS file:
    1. svn co https://dist.apache.org/repos/dist/release/zookeeper/ zookeeper_dist
    2. cd zookeeper_dist.
    3. edit the KEYS file. See the top of the KEYS file for instructions on how to edit this file
    4. svn ci
  4. Upload digest to your account on id.apache.org (gpg2 --fingerprint)

If you have any issues (i.e. "error: gpg failed to sign the data") when trying to sign your commit (tag), refer to this gist.

Useful Links and Background:

Apache infra page: https://cwiki.apache.org//confluence/display/INFRA/Index

Apache self-service page - now allows for forcing git repo synchttps://selfserve.apache.org/

Important Notes

Configuring maven

Make sure your settings.xml in ~/.m2 contain logins for apache repos, and your signing key is published and configured here.

Please follow the instructions here to encrypt your Apache credentials: https://maven.apache.org/guides/mini/guide-encryption.html

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <servers>
    <!-- To publish a snapshot -->
    <server>
      <id>apache.snapshots.https</id>
      <username>YOUR_APACHE_ID</username>
      <password>YOUR_APACHE_PASSWORD</password>
    </server>

    <!-- To stage a release -->
    <server>
      <id>apache.staging.https</id>
      <username>YOUR_APACHE_ID</username>
      <password>YOUR_APACHE_PASSWORD</password>
    </server>

   <server>
     <id>apache.releases.https</id>
     <username>YOUR_APACHE_ID</username>
     <password>YOUR_APACHE_PASSWORD</password>
   </server>
 </servers>

  <profiles>
    <profile>
      <id>apache-release</id>
      <properties>
	    <!-- gpg --list-keys will show you your keyname ( something like 00A5F21E) -->
    	<gpg.keyname>YOUR_KEYNAME</gpg.keyname>
  		<gpg.passphrase>YOUR_KEY_PASSWORD</gpg.passphrase>
      </properties>
    </profile>
  </profiles>
</settings>

For a more detailed steps, check out How To Release page for Hadoop. It is used as a base.

Smoke Tests

Before the release, run the following smoke tests (at least).

Branching and Tagging

Building

Publishing