Versions Compared

Key

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

...

Code Block
RC_NUM=0
BRANCH_NAME=branch-3.6
BRANCH_VERSION=3.6.1-SNAPSHOT
RELEASE_DEVELOPMENT_VERSION=3.6.2-SNAPSHOT
RELEASE_VERSION=3.6.1
TAG=release-$RELEASE_VERSION-$RC_NUM

git checkout $BRANCH_NAME
git pull
git push --dry-run

...


Create release notes on release branch

...

Update the copyright years in NOTICE.txt if it's outdated.

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.
Hints for editing releasenotes.md (using vim) - you can skip 'c' parameter, it tells vim to ask for all replacement:

Code Block
languagexml
:%s/<\/h2>//gc
:%s/<li>\[<a href='\(.*\)'>\(ZOOKEEPER-[0-9]\+\)<\/a>\] - \+/* [\2](\1) - /gc
:%s/<\/li>\n//gc

Push the change to the release branch (no review is needed at this point)

Build and check that the release branch is in good shape

Run spotBugs, checkstyle and rat checks:

Code Block
git clean -xdf
# perform quality checks
mvn clean apache-rat:check -DskipTests -Pfull-build
mvn clean install checkstyle:check spotbugs:check -DskipTests -Pfull-build
# run tests
mvn clean install -DskipTests

Perform a release on branch (for major and minor release)

Code Block
git checkout $BRANCH_NAME
git clean -xdf

mvn release:prepare \
   -DautoVersionSubmodules=true  \
   -DreleaseVersion=$RELEASE_VERSION \
   -Dtag=$TAG  \
   -DdevelopmentVersion=$RELEASE_DEVELOPMENT_VERSION \
   -Darguments='-DskipTests=true -Pfull-build,apache-release' -Pfull-build,apache-release

see details in 

Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyZOOKEEPER-3635

The command above perform the following activities:

  • removes -SNAPSHOT in all of the pom.xml files (the version is RELEASE_VERSION)
  • build the project (even the C client and contrib packages)
  • ensures the correct version in C client files (configure.ac, CMakelink.txt, TODO zookeeper_version.h)
  • created a signed tag
  • bump the branch to the next minor version (RELEASE_DEVELOPMENT_VERSION)


Checklist

Code Block
git checkout $BRANCH_NAME
git clean -xdf

mvn release:prepare \
   -DautoVersionSubmodules=true  \
   -DreleaseVersion=$RELEASE_VERSION \
   -Dtag=$TAG  \
   -DdevelopmentVersion=$RELEASE_DEVELOPMENT_VERSION \
   -Darguments='-DskipTests=true -Pfull-build,apache-release' -Pfull-build,apache-release

see details in 

Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyZOOKEEPER-3635

The command above perform the following activities:

  • removes -SNAPSHOT in all of the pom.xml files
  • build the project (even the C client and contrib packages)
  • ensures the correct version in C client files (configure.ac, CMakelink.txt, TODO zookeeper_version.h)
  • created a signed tag
  • umps
Code Block
cd zookeeper-client/zookeeper-client-c
sed -i s/$BRANCH_VERSION/$RELEASE_VERSION/g configure.ac
sed -i s/$BRANCH_VERSION/$RELEASE_VERSION/g CMakeLists.txt
cd ../..
grep -r $NEWVERSION *

TODO IN THIS GUIDE!!!!

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.
Hints for editing releasenotes.md (using vim) - you can skip 'c' parameter, it tells vim to ask for all replacement:

Code Block
languagexml
:%s/<\/h2>//gc
:%s/<li>\[<a href='\(.*\)'>\(ZOOKEEPER-[0-9]\+\)<\/a>\] - \+/* [\2](\1) - /gc
:%s/<\/li>\n//gc

TODO IN THIS GUIDE!!!!

  • Update the copyright years in NOTICE.txt if it's outdated.

    Make sure the version number is correct in zookeeper-client/zookeeper-client-c/configure.aczookeeper-client/zookeeper-client-c/CMakeLists.txt, and zookeeper-client/zookeeper-client-c/include/zookeeper_version.h 

  • Update the version number in build.xml to be ''X.Y.Z'' (i.e. remove SNAPSHOT designator)
  • -client-c/include/zookeeper_version.h 

  • Commit these changes.

    Code Block
    languagexml
    # 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-X
    git commit -m "Preparing for release $VERSION"
    git push <remote> branch-X.Y.Z


  • Run spotBugs, checkstyle and rat checks:

    Code Block
    git clean -xdf
    mvn clean apache-rat:check -DskipTests -Pfull-build
    mvn clean install checkstyle:check spotbugs:check -DskipTests -Pfull-build


  • 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


  • In Jira, move open issues to next version. Disable mail notifications for this bulk change.

...

Preparing the release candidate

  • 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)

    Ensure that you are using JDK8 and Maven 3.6+

  • There is no need to build the C client or "contrib" packages

    Code Block
    mvngit checkout $TAG
    git clean -vxdf 
    mvn clean install -DskipTests release:perform -Darguments='-DskipTests=true -Pfull-build,apache-release' -Papache-release,full-build 
    


  • You should have the SIGNED jar files and also the tarballs built. The two tarball is available at:
    • zookeeper-assembly/target/apache-zookeeper-X.Y.Z-bin.tar.gz
    • zookeeper-assembly/target/apache-zookeeper-X.Y.Z.tar.gz

    Sign the tarballs:

    Code Blockcd zookeeper-assembly/target gpg --armor --output
    • apache-zookeeper-
    $VERSION
    • X.Y.Z-bin.tar.gz
    .asc --detach-sig
    • zookeeper-assembly/target/apache-zookeeper-
    $VERSION-bin
    • X.
    tar.gz gpg --armor --output apache-zookeeper-$VERSION.tar.gz.asc --detach-sig apache-zookeeper-$VERSION.tar.gz
    • Y.Z.tar.gz
  • This command also staged all of the maven artifacts to repository.apache.org

Self validate the Release candidate

Check that release file looks ok - e.g. install it and run examples from tutorial.

  • untar the release artifact in a test directory
  • try to build the sources with
Code Block
mvn clean install -DskipTests -Pfull-build
  • validate the contents of the staging Maven repository


Stage source and binaries to your own Apache home

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-$VERSION-candidate-0
> cd zookeeper-$VERSION-candidate-0
> put zookeeper-$VERSION.tar.gz*
> bye


Close the Maven Repository

  • untar the release artifact in a test directory
  • try to build the sources with

    Code Block
    mvn clean install -DskipTests -Pfull-build

    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-$VERSION-candidate-0
    > cd zookeeper-$VERSION-candidate-0
    > put zookeeper-$VERSION.tar.gz*
    > bye
    

    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
    git checkout $TAG
    mvn release:perform \
           -DreleaseProfiles=apache-release \
           -Darguments='-DskipTests=true' 
    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.

Call for VOTE

...