...
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 | ||
---|---|---|
| ||
:%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 | ||||||
---|---|---|---|---|---|---|
|
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 | ||||||
---|---|---|---|---|---|---|
|
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 | ||
---|---|---|
| ||
:%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.ac, zookeeper-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 language xml # 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:
cd zookeeper-assembly/target gpg --armor --outputCode Block - apache-zookeeper-
- X.Y.Z-bin.tar.gz
- zookeeper-assembly/target/apache-zookeeper-
- X.
- 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
Click on Log In in the upper right corner. Log in using your apache user name and password.
In the left navigation pane, select Staging Repositories.
- 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.)
Click the Close button above the Repository names. This makes your release candidate available at the Staging level.
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.
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.
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' |
Call for VOTE
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):
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:
https://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:
https://www.apache.org/dist/zookeeper/KEYS
Should we release this candidate?
Release Manager Signature
...