...
- Make sure you are working with a clean repo (i.e. identical to upstream - no changes in progress). If needed clone a fresh copy
- git checkout trunk
- Check that current HEAD points to commit on which you want to base new release branch. Checkout particular commit if not.
- git branch 0.10.0
- git push apache 0.10.0
- Check that the branch was correctly propagated to Apache using the webui: https://git-wip-us.apache.org/repos/asf?p=kafka.git
- Modify the version in trunk to bump to the next one "0.10.1.0-SNAPSHOT" in gradle.properties, tests/kafkatest/__init__.py and kafka-merge-pr.py. Commit and push to trunk in apache.
- Create new Jenkins Build job that validates the new branch (Java 7 is enough)
Send email announcing the new branch:
No Format To: dev@kafka.apache.org Subject: New release branch 0.10.0 Hello Kafka developers and friends, As promised, we now have a release branch for 0.10.0 release (with 0.10.0.0 as the version). Trunk has been bumped to 0.10.1.0-SNAPSHOT. I'll be going over the JIRAs to move every non-blocker from this release to the next release. From this point, most changes should go to trunk. *Blockers (existing and new that we discover while testing the release) will be double-committed. *Please discuss with your reviewer whether your PR should go to trunk or to trunk+release so they can merge accordingly. *Please help us test the release! * Thanks! $RM
Create Release Artifacts
Create a release tag - because our release branch is still 0.10.0.0-SNAPSHOT but our release artifact needs to be 0.10.0.0, we'll make the change in a tag:
- Modify the version in 0.10.0 branch to remove "-SNAPSHOT" in gradle.properties, and remove ".dev0" suffix in tests/kafkatest/__init__.py. Commit locally, but don't push to Apache.
- Prepare an RC tag:
git tag -a 0.10.0.0-rc0 (this will tag the version change commit, get the rc part to match the actual rc number)
Move the branch head back, so future commits will still have "-SNAPSHOT"
- git reset --hard HEAD~1
- Push the tag to Apache (the following assumes that `apache` is the remote name for https://git-wip-us.apache.org/repos/asf/kafka.git):
- git push apache 0.10.0.0-rc0
Prepare a workspace:
mkdir 0.10.0.0_RELEASE
cd 0.10.0.0_RELEASE/
- mkdir kafka-0.10.0.0-rc0
git clone https://git-wip-us.apache.org/repos/asf/kafka.git kafka
cd kafka
git checkout -b 0.10.0 tags/0.10.0.0-rc0 <- important! checkout the tag, or you'll be releasing SNAPSHOT accidentally.
Check NOTICE and LICENSE files
- Make sure the NOTICE file has the correct year
Prepare release notes
- Go to JIRA, move all unresolved jiras with "Fix versions" of 0.10.0.0 to future releases.
Run ./release_notes.py 0.10.0.0 > ../kafka-0.10.0.0-rc0/RELEASE_NOTES.html. It will fail if you have any unresolved JIRAs still in the release, listing the JIRAs that still need to be addressed. Otherwise, double check that the output in RELEASE_NOTES.html looks ok for the release
Prepare the source artifact
git archive --format tar.gz --prefix kafka-0.10.0.0-src/ -o ../kafka-0.10.0.0-rc0/kafka-0.10.0.0-src.tgz 0.10.0.0-rc0
Prepare the binary artifacts and aggregated javadoc
- Make sure your java is on jdk 1.7 (On mac: export JAVA_HOME=$(/usr/libexec/java_home -v 1.7))
- Make sure you have Gradle installed
- gradle
- ./gradlew clean releaseTarGzAll aggregatedJavadoc
- cp core/build/distributions/* ../kafka-0.10.0.0-rc0
- cp -R build/docs/javadoc ../kafka-0.10.0.0-rc0
No Format |
---|
NOTE: as of 0.10.1 Kafka builds do not include Scala 2.12 yet, if you want to specifically create the artifacts for Scala 2.12, use ./gradlew releaseTarGz -PscalaVersion=2.12.1 |
Sign the artifacts
- Make sure you have gpg keys to sign the release artifacts
- Sign the artifacts:
- cd ../kafka-0.10.0.0-rc0
- Run the following commands (you may have to specify the gpg key to use via the `-u` option if you have multiple keys; if you forgot your key signature id, use `gpg --list-sigs <your-name>`):
for file in *.tgz; do gpg --armor --output $file.asc --detach-sig $file; done
for file in *.tgz; do gpg --verify $file.asc $file; done
for file in *.tgz; do gpg --print-md md5 $file > $file.md5; done
for file in *.tgz; do gpg --print-md sha1 $file > $file.sha1; done
for file in *.tgz; do gpg --print-md sha512 $file > $file.sha2; done
- cd ..
Upload all the binary artifacts, release notes, javadoc to your home.apache.org URL
- sftp can be used to copy the relevant files over to <apache_id>@home.apache.org/public_html:
- sftp <apache_id>@home.apache.org
- mkdir public_html (this only needs to be done the first time)
- cd public_html
- mkdir kafka-0.10.0.0-rc0
- put -r kafka-0.10.0.0-rc0 .
- If you find sftp is a bit clunky, lftp is an alternative
Upload artifacts to Maven staging repository
- Go drop whatever staging repository is in the maven repo (if any): https://repository.apache.org/#stagingRepositories
- Make sure you have your gpg keys (see Prerequisites section for specifics)
- Set up ~/.gradle/gradle.properties like the following. Make sure that you can login to https://repository.apache.org/ with your apache id/passwd. The value for signing.keyId can be found by running
gpg --list-secret-keys
. The number after the/
in the line starting withsec
is your signing.keyId.
mavenUrl=https://repository.apache.org/service/local/staging/deploy/maven2
mavenUsername=your-apache-id
mavenPassword=your-apache-passwd
signing.keyId=your-gpgkeyId
signing.password=your-gpg-passphrase
signing.secretKeyRingFile=/Users/your-id/.gnupg/secring.gpg (if you are using GPG 2.1 and beyond, then this file will no longer exist anymore, and you have to manually create it from the new private key directory with "gpg --export-secret-keys -o ~/.gnupg/secring.gpg")
...
Run the `release.py` script in the root of the kafka repository and follow the instructions.
Website update process
For new releases:
- Make sure the documentation (docs/documentation.html, docs/quickstart.html,docs/api.html) are all referring to the correct release and links.
- git clone https://git-wip-us.apache.org/repos/asf/kafka-site.git
- git checkout asf-site
- The releaseTarGzAll target should auto-generate the configuration docs for broker/producer/consumer in ./core/build/distributions/kafka_2.11-0.10.0.0-site-docs.tgz. Untar the file and rename site-docs to 0100 (or if the latter already exists, replace its contents).
- Copy release javadoc to 0100/ (for bug-fix releases, only do this after the vote has passed to avoid showing an unreleased version number in the published javadocs)
- If this is a major/minor release, update the list of legacy paths in
includes/_header.htm
- Commit
...