Versions Compared

Key

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

...

Code Block
export GPG_TTY=$(tty)

mvn clean install -Pfull-build -Papache-release -DskipTests




Create a branch (

...

when you create X.Y.0 and move master to X.Y+1.0)

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

...

It is now time to create CI jobs for the new branch, if you do not have permissions to edit CI configuration just send an email to dev@zookeeper.apache.org

...


Preparation for minor release, say 3.6.1

...

If you are releasing a version that is not the first one of a main branch just checkout the release branch

Code Block
RC_NUM=0
BRANCH_NAME=branch-3.6
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

...

a work branch for the release

If you are releasing a version that is not the first one of a main branch just checkout the release branch

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

git checkout $BRANCH_NAME
git checkout -b $WORK_BRANCH
git pull
git push --dry-run
git status
# you are now in release-x.y.z branch

Create release notes on release branch

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

...

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 these changes to the $WORK_BRANCH (release-3.6.0) and to the $RELEASE_BRANCH (branch-3.6)  (no review is needed at this point)at this point)

In case you have to run more than one RC you have to update the release notes every time and push them to those two branches.

Build and check that the release branch is in good shape

Run spotBugs, checkstyle and rat checks:

Code Block
git checkout $WORK_BRANCH
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 -Pfull-build

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

Code Block
git checkout $BRANCH$WORK_NAMEBRANCH
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

...

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

    1. Compare and sync the WORK_BRANCH with the RELEASE_BRANCH, check RELEASE NOTES and Maven Version in pom.xml and in the C client
    2. Tag the release. Do it from the release branch and push the created tag to the remote repository:

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


    3. Check in release files to the distribution server

    4. Code Block
      svn co https://dist.apache.org/repos/dist/release/zookeeper/ zookeeper_dist
      cd zookeeper_dist
      mkdir zookeeper-X.Y.Z
      # copy tgz/asc/checksum files from your public_html to zookeeper-X.Y.Z
      svn add zookeeper-X.Y.Z
      svn ci -m "Add ZooKeeper X.Y.Z release"
      
      1. After checking in the release, you'll receive an automated email from reporter.apache.org with a link requesting additional details about the release.  This form must be completed by a PMC member.  If you are a PMC members, follow the link and complete the form.  If you are not a PMC member, forward the email to dev@zookeeper.apache.org and ask for assistance from a PMC member.
    5. The release directory usually contains just two releases, the most recent from two branches, with a link named 'stable' to the most recent recommended version.

      Code Block
      cd zookeeper_dist
      svn rm zookeeper-A.B.C # apache folks don't like old releases hanging around - they are available in the archive if people need access
      rm stable; rm current
      ln -s zookeeper-A.B.D stable
      ln -s zookeeper-A.B.D current
      svn ci -m 'Updating links'  


    6. Release the Maven artifacts on Apache Nexus:
      1. Click on 'Staging repositories'.
      2. Select the repository corresponding to the release candidate.
      3. Click on the 'Release' button and follow instructions.

    7. Wait 24 hours for release to propagate to mirrors.

    8. Prepare to edit the website. ZooKeeper uses Jekyll/Markdown with gitpubsub. See WebSiteSetup for general instructions and tool setup/prerequisites.

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


    9. Copy the new release documentation into the _released_docs directory

      Code Block
      cd _released_docs
      mkdir rX.Y.Z
      cd rX.Y.Z
      tar xvf apache-zookeeper-X.Y.Z-bin.tar.gz --strip-components 2 'apache-zookeeper-X.Y.Z-bin/docs'
      rm apache-zookeeper-X.Y.Z-bin.tar.gz
      # Update the "current" doc pointer if necessary (next 2 lines)
      cd ..
      rm current
      ln -s rX.Y.Z current
      git add rX.Y.Z current
      cd ..


    10. Change directory to src/main/resources/markdown
    11. Update the release news in releases.md
    12. Update the nav panel in html/header.html and documentation.md to include X.Y.Z
    13. Stage changes to git

      Code Block
      git add releases.md documentation.md html/header.html


    14. Regenerate the site, review it, then commit it. (install Jekyll/pygments if you haven't already - see the README.md in website branch)

      Code Block
      mvn clean install
      cp -RP _released_docs target/html/doc
      # at this point verify that the site is working properly - open _site/index.html
      # once you are happy move on to the next step...
      git commit -m "Updated website content for release X.Y.Z."
      
      git push origin website


    15. Deploy: you are now ready to deploy the changes to the public website using gitpubsub. Using the same repo as the previous step:

      Code Block
      git checkout asf-site
      rm -fr content
      mv target/html content
      git add content
      # verify that the content of "content" looks proper. open content/index.html in a browser and verify, etc...
      # verify git staging looks proper - remember, we added the release docs to content/doc/rX.Y.Z and that will also be added here
      git commit -m "Website update for release X.Y.Z"
      
      git push origin asf-site

      If the apache zookeeper website does not update, check if the commit is mirrored into github.com/apache/zookeeper asf-site branch

    16. Send announcements to the user and developer lists once the site changes are visible. Here is a sample email:

      No Format
      Subject: [ANNOUNCE] Apache ZooKeeper X.Y.Z
      
      The Apache ZooKeeper team is proud to announce Apache ZooKeeper version X.Y.Z
      
      ZooKeeper is a high-performance coordination service for distributed
      applications. It exposes common services - such as naming,
      configuration management, synchronization, and group services - in a
      simple interface so you don't have to write them from scratch. You can
      use it off-the-shelf to implement consensus, group management, leader
      election, and presence protocols. And you can build on it for your
      own, specific needs.
      
      For ZooKeeper release details and downloads, visit:
      https://zookeeper.apache.org/releases.html
      
      ZooKeeper X.Y.Z Release Notes are at:
      https://zookeeper.apache.org/doc/rX.Y.Z/releasenotes.html
      
      We would like to thank the contributors that made the release possible.
      
      Regards,
      
      The ZooKeeper Team
      


    17. In Jira, ensure that only issues in the "Fixed" state have a "Fix Version" set to release X.Y.Z.
    18. In Jira, "release" the version. Visit the "Administer Project" page, then the "Manage versions" page. You need to have the "Admin" role in ZooKeeper's Jira for this step and the next.
    19. In Jira, close issues resolved in the release. Disable mail notifications for this bulk change.