Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

...

Branching and Taging

  • Check out the branch you are making the release of:

    Code Block
    git clone -b branch-X.Y https://gitbox.apache.org/repos/asf/zookeeper.git


  • If you are creating a point release (almost always the case) then follow this step. The exception to this is typically only when creating a new release candidate because the previous candidate failed during voting (rc0 failed and you are creating rc1+) – in which case skip this step.

    Create a branch for X.Y.Z (the current release candidate)

    Code Block
    git branch branch-X.Y.Z
    git push <remote> branch-X.Y.Z


  • Remove the "-SNAPSHOT" from the version in all pom.xml.
    For example, to do the first release candidate on 3.5.5, run:

    Code Block
    languagexml
    title.m2 settings
    mvn clean org.codehaus.mojo:versions-maven-plugin:2.7:set -DnewVersion=3.5.5

    Note: we do not add "-RC0" at the and, because if votes passes on the Release Candidate, this will be the release we deploy to maven central.

    Also update the version number in src/c/configure.acsrc/c/CMakeLists.txt, and src/c/include/zookeeper_version.h to the next logical SNAPSHOT version (e.g. X.Y.Z to X.Y.(Z+1)-SNAPSHOT)

  • Update the copyright years in NOTICE.txt if it's outdated.
  • Do a search in the project for the version with the attached -SNAPSHOT to make sure it is changed everywhere. Some files (other than pom.xml) might also contain a hard coded version.

  • Clean your working directory:

    Code Block
    languagexml
    mvn clean
    git clean -fxd


  • ToDO: rat here?

  • Commit these changes.

    Code Block
    # check for modified files
    git status
    
    # add modified files one by one
    git add <modified files>
     
    # commit and push the changes to remote repo branch-X.Y
    git commit -m "Preparing for release X.Y.Z"
    git push <remote> branch-X.Y.Z


  • Tag the release candidate (R is the release candidate number, and starts from 0):

    Code Block
    # create a signed tag
    git tag -s release-X.Y.Z-rcR -m "ZooKeeper X.Y.Z-rcR release."
     
    # push the newly created rc tag to the remote repo.
    git push <remote> release-X.Y.Z-rcR

Publishing

Once three PMC members have voted for a release, it may be published.

Smoke Tests

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

...


Building

  • Build the projects with maven (we are skipping runit the unit tests here, but you should run them at least once on the release branch before continuing)

    Code Block
    mvn clean install -DskipTests
    


  • You should have the jar files and also the tarballs built. The two tarball is available at: //TODO: sign ZK jars in bin-package?
    • zookeeper-assembly/target/zookeeper-X.Y.Z-bin-package.tar.gz
    • zookeeper-assembly/target/zookeeper-X.Y.Z-source-package.tar.gz

Publishing

Once three PMC members have voted for a release, it may be published.

  • Deploy to the Maven Repository.
    This is done using apache-release profile, coming from the apache parent pom. This will also sign your artifacts if your settings.xml is configured as mentioned above.
    The following command copies all artifacts to a temporary staging Apache mvn repository in open state:

    Code Block
    mvn deploy -DskipTests -Papache-release
    


  • Make the release candidate available

    You can check the artifacts you just uploaded in the Apache’s Nexus at repository.apache.org using your Apache ID. Click 'Staging Repositories' and look for a new ZooKeeper repository with a status of 'Open'. Check that all the artifacts and pom files are available. As long as this is in open state, you can re-upload your files. Or just use 'Drop' on the staging repo.

    If it checks out, close the repo using the 'Close' button. The repository must be closed before a public URL to it becomes available. It may take a few minutes for the repository to close. Once complete you’ll see a public URL to the repository in the Nexus UI. You may also receive an email with the URL. Provide the URL to the temporary staging repository in the email that announces the release candidate.

    When the release vote concludes successfully, return here and click the 'Release' button to release the artifacts to central. The release process will automatically drop and delete the staging repository.

Smoke Tests

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

  • Run unit tests on different hardwares: mac, windows, linux.



***************

***************

**************

Branching

Skip this section if this is NOT the first release in a series (i.e. release X.Y.0).

...

  1. Check out the branch with:

    Code Block
    git clone -b branch-X.Y https://gitbox.apache.org/repos/asf/zookeeper.git


  2. If you are creating a point release (almost always the case) then follow this step. The exception to this is typically only when creating a new release candidate because the previous candidate failed during voting (rc0 failed and you are creating rc1+) – in which case skip this step.

    Create a branch for X.Y.Z (the current release candidate)

    Code Block
    git branch branch-X.Y.Z
    git push <remote> branch-X.Y.Z


    Update the version number in build.xmlsrc/c/configure.acsrc/c/CMakeLists.txt, and src/c/include/zookeeper_version.h to the next logical SNAPSHOT version (e.g. X.Y.Z to X.Y.(Z+1)-SNAPSHOT)

    Commit this change.

    Code Block
    # check for modified files
    git status
    
    # add modified files one by one
    git add <modified files>
     
    # commit and push the changes to remote repo branch-X.Y
    git commit -m "Prepare for the next release: update the version to X.Y.(Z+1)-SNAPSHOT"
    git push <remote> branch-X.Y


  3. Checkout the active point release branch - this is where you will be creating the release candidate

    Code Block
    git checkout branch-X.Y.Z


  4. If not already done, cherry-pick desired commits into branch-X.Y.Z. If cherry-picks are done from other than branch-X.Y ensure that those changes are also committed to branch-X.YIf there are conflicts, then it is preferable to produce a new patch for this branch, review it separately and commit it via JIRA. Please refer HowToContribute and Committing changes page for pushing changes to the project. 

    Code Block
    # The -x option records the source commit, and reuses the original commit message
    git cherry-pick -x <commit-hash>


  5. Do a final pass regeneration of docs by running "ant -Dforrest.home=<path to Forrest> clean docs".  If there are any modifications, then they'll show up under the docs folder.  If there are any changes, then commit them.  However, DO NOT commit changes in docs/releasenotes.html or docs/releasenotes.pdf.  (Release notes are handled in a separate step.)  Release notes should be regenerated each time a documentation patch is committed.  This final pass before the release is intended to catch mistakes in case this step was missed at commit time.
  6. Update zookeeper-docs/src/main/resources/markdown/releasenotes.md with release notes for this release. You can get the HTML by following the "Release Notes" link for the relevant release on the https://issues.apache.org/jira/browse/ZOOKEEPER?report=com.sourcelabs.jira.plugin.portlet.releases:releases-projecttab#selectedTab=com.atlassian.jira.plugin.system.project%3Aroadmap-panel tab in Jira. Note that you need to exclude the won't fix or invalid tickets.
  7. Update the version number in build.xml to be ''X.Y.Z'' (i.e. remove SNAPSHOT designator)
  8. Update the version number in src/c/configure.ac, src/c/CMakeLists.txt, and src/c/include/zookeeper_version.h to be ''X.Y.Z''
  9. Update the copyright years in NOTICE.txt if it's outdated.
  10. Commit these changes.

    Code Block
    # check for modified files
    git status
    
    # add modified files one by one
    git add <modified files>
     
    # commit and push the changes to remote repo branch-X.Y
    git commit -m "Preparing for release X.Y.Z"
    git push <remote> branch-X.Y.Z


  11. Tag the release candidate (R is the release candidate number, and starts from 0):

    Code Block
    # create a signed tag
    git tag -s release-X.Y.Z-rcR -m "ZooKeeper X.Y.Z-rcR release."
     
    # push the newly created rc tag to the remote repo.
    git push <remote> release-X.Y.Z-rcR


Building

  1. Build the release & run unit tests.

    Code Block
    ant test package tar
    

    (warning) Don't skip the "test" part and don't just do "ant package tar"! See here for why.

  2. Untar the generated zookeeper-X.Y.Z.tar.gz and do the following:
    1. Sign the toplevel zookeeper-X.Y.Z.jar

      Code Block
      gpg --armor --output zookeeper-X.Y.Z.jar.asc --detach-sig zookeeper-X.Y.Z.jar
      


    2. Sign each file in dist-maven

      Code Block
      for i in dist-maven/*.jar dist-maven/*.pom; do gpg --armor --output $i.asc --detach-sig $i; done
      


  3. Tar/GZ the release directory as zookeeper-X.Y.Z.tar.gz

    Code Block
    tar czf zookeeper-X.Y.Z.tar.gz zookeeper-X.Y.Z
    


  4. Generate the checksums for the release artifact. See this page for latest Apache guidelines.

    Code Block
    shasum -a 256 zookeeper-X.Y.Z.tar.gz > zookeeper-X.Y.Z.tar.gz.sha256
    shasum -a 512 zookeeper-X.Y.Z.tar.gz > zookeeper-X.Y.Z.tar.gz.sha512
    


  5. Sign the release

    Code Block
    gpg --armor --output zookeeper-X.Y.Z.tar.gz.asc --detach-sig zookeeper-X.Y.Z.tar.gz
    


  6. Check that release file looks ok - e.g. install it and run examples from tutorial.
    1. untar the release artifact in a test directory
  7. Copy release files to a public place and ensure they are readable. Note that home.apache.org only supports SFTP, so this may be easier with a graphical SFTP client like Nautilus, Konqueror, etc.

    Code Block
    sftp home.apache.org
    > cd public_html
    > mkdir zookeeper-X.Y.Z-candidate-0
    > cd zookeeper-X.Y.Z-candidate-0
    > put zookeeper-X.Y.Z.tar.gz*
    > bye


  8. Stage the release artifacts to the Apache Nexus repository
    1. Create ~/.m2/settings.xml introducing the values that are specific to you:

      Code Block
      <settings>
        <servers>
           <server>
             <id>apache.snapshots.https</id>
             <username>XXXXXXX</username>
             <password>XXXXXXXX</password>
           </server>
           <server>
             <id>apache.staging.https</id>
             <username>XXXXXXX</username>
             <password>XXXXXXX</password>
           </server>
         </servers>
         <profiles>
           <profile>
             <id>gpg</id>
             <properties>
               <gpg.passphrase>XXXXXXX</gpg.passphrase>
             </properties>
           </profile>
         </profiles>
      </settings>

      See http://maven.apache.org/guides/mini/guide-encryption.html for details on encrypting the passwords rather than leaving them in the clear.

    2. Run the following on the branch check out

      Code Block
      ant mvn-deploy -Dstaging=true


    3. Enter Apache Nexus and do the following:
      1. Click on Log In in the upper right corner. Log in using your apache user name and password.  

      2. In the left navigation pane, select Staging Repositories.  

      3. Identify the release candidate you just pushed, by your user name (in parentheses as part of the "Repository" name) and the "Created On" date. Click on the check box to the left of your Repository name to select it. (If you accidentally click on the Repository name itself, another tab will pop open. If so, just close it.)  
      4. Click the Close button above the Repository names. This makes your release candidate available at the Staging level.  

      5. If you have previously staged an older release candidate with the same version number, and it is still showing in the Repository list, you must select and Drop the old one now.  

      6. Confirm that your new release candidate is visible at https://repository.apache.org/content/groups/staging/org/apache/zookeeper/zookeeper/ with correct file modification dates.

  9. Call for a release vote on dev (note dev@ and not user@, the user list is for discussion of released software only) at zookeeper.apache.org. Here is a sample email (from 3.4.6 release):


    Code Block
    languagetext
    Subject: [VOTE] Apache ZooKeeper release 3.4.6 candidate 0
    
    This is a bugfix release candidate for 3.4.6. It fixes 117 issues, including issues that
    affect leader election, Zab, and SASL authentication.
    
    The full release notes is available at:
    
    https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310801&version=12323310
    
    *** Please download, test and vote by March 9th 2014, 23:59 UTC+0. ***
    
    Source files:
    http://people.apache.org/~fpj/zookeeper-3.4.6-candidate-0/
    
    Maven staging repo:
    https://repository.apache.org/content/groups/staging/org/apache/zookeeper/zookeeper/3.4.6/
    
    The release candidate tag in git to be voted upon: release-X.Y.Z-rcR
    
    ZooKeeper's KEYS file containing PGP keys we use to sign the release:
    http://www.apache.org/dist/zookeeper/KEYS
    
    Should we release this candidate?


...