...
Code Block |
---|
mvn clean install -DskipTests=true mvn clean apache-rat:check |
Push branch to remote
Code Block |
---|
git push -u origin branch-x.y.z
|
Generate CHANGES.txt
Currently we don't keep CHANGES.txt in repo and only generate it on demand. To find previous example, search in previous release branch.
To generate CHANGES.txt, please pull information from JIRA and git log. To get all JIRAs of this release, use filter 'fixVersion = <version> AND resolution = resolved'. To get all commits of this release, you can find the last commit in last release in corresponding release branch and do a git diff against current release branch. Open a JIRA to commit the newly generated CHANGES.txt to branch-x.y.z. A review of the patch is preferable.
Code Block |
---|
git log rel/<previous_release>..origin/branch-x.y.z --format="%s" # command to get the commit logs that go in CHANGES.txt
#origin is the git remote for https://gitbox.apache.org/repos/asf/tez.git |
There are cases where information from JIRAs is inconsistent with that from git log (which shouldn't happen but unfortunately happens sometime...). For example, committer may forget to mark JIRA as resolved or set the fix version, or There are cases where information from JIRAs is inconsistent with that from git log (which shouldn't happen but unfortunately happens sometime...). For example, committer may forget to mark JIRA as resolved or set the fix version, or commit message contains wrong JIRA number. So it's better to check both side.
...
Code Block |
---|
git tag -a release-x.y.z-rc0 -m 'Tez x.y.z 'Tez x.y.z RC0'RC0' # push the new tag git push origin release--tags originx.y.z-rc0 |
Deploy the jars to Staging
...
Code Block |
---|
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <servers> <server> <id>apache.staging.https</id> <username>XXXXXX</username> <password>YYYYYY</password> </server> </servers> <profiles> <profile> <id>gpg</id> <properties> <gpg.passphrase>XXXXXXX</gpg.passphrase> <properties> <gpg.passphrase>XXXXXXX</gpg.passphrase> <!-- gpg.executable should be gpg if a lower version is used for creating the key --> <gpg.executable>gpg2</gpg.executable> </properties> </profile> </profiles> </settings> |
To deploy jars, run:
Code Block |
---|
mvn clean deploy -Psources,javadoc,sign -DskipTests=true
|
Log on to https://repository.apache.org and look at the Staging Repositories. "Close" the tez jars recently uploaded to get the temporary staging repo URL.
Create a Release tarball for the Source
Code Block |
---|
mvn clean
git clean -f -x -d
cd ..
cp -R tez-git-x.y.z apache-tez-{x.y.z}-src (where tez-git-x.y.z is the tez code directory)
COPYFILE_DISABLE=1 tar --exclude=.git -zcvf apache-tez-{x.y.z}-src.tar.gz apache-tez-{x.y.z}-src
|
Sign the Release
</profile>
</profiles>
</settings>
|
To deploy jars, run:
Code Block |
---|
mvn clean deploy -Psources,javadoc,sign -DskipTests=true
|
The above command allows one to see the deployed jars in the Staging area. Log on to https://repository.apache.org and look at the Staging Repositories. "Close" the tez jars recently uploaded to get the temporary staging repo URL.
Create a Release tarball for the Source
Code Block |
---|
mvn clean
git clean -f -x -d
cd ..
cp -R tez-git-x.y.z |
Code Block |
gpg2 --armor --output apache-tez-{x.y.z}-src.tar.gz.asc --detach-sig apache-tez-{ (where tez-git-x.y.z}-src.tar.gz |
Generate MD5 checksums
Code Block |
---|
md5sum is the tez code directory) COPYFILE_DISABLE=1 tar --exclude=.git -zcvf apache-tez-{x.y.z}-src.tar.gz > apache-tez-{x.y.z}-src |
Sign the Release
Code Block |
---|
gpg2 --armor --output.tar.gz.md5 shasum -a 512 apache-tez-{x.y.z}-src.tar.gz >.asc --detach-sig apache-tez-{x.y.z}-src.tar.gz.sha |
...
Generate checksums
Code Block |
---|
openssl md5shasum -a 512 apache-tez-{x.y.z}-src.tar.gz > apache-tez-{x.y.z}-src.tar.gz.md5sha512 |
or
Code Block |
---|
openssl dgst -sha512 apache-tez-{x.y.z}-src.tar.gz > apache-tez-{x.y.z}-src.tar.gz.shasha512 |
Create Binary Tarball as a helper for Users
...
Code Block |
---|
#Define the following environment variables TEZ_SRC_DIR (e.g. tez-src or the absolute path) RELEASE_VERSION (e.g. 0.8.4) cd ${TEZ_SRC_DIR}; mvn clean install -DskipTests mvn site cd .. mkdir apache-tez-${RELEASE_VERSION}-bin tar -C apache-tez-${RELEASE_VERSION}-bin -zxvf ${TEZ_SRC_DIR}/tez-dist/target/tez-${RELEASE_VERSION}-minimal.tar.gz mkdir tmp-tez-full tar -C tmp-tez-full -zxvf ${TEZ_SRC_DIR}/tez-dist/target/tez-${RELEASE_VERSION}.tar.gz cp tmp-tez-full/LICENSE* apache-tez-${RELEASE_VERSION}-bin/ cp tmp-tez-full/NOTICE* apache-tez-${RELEASE_VERSION}-bin/ rm -rf tmp-tez-full mkdir apache-tez-${RELEASE_VERSION}-bin/conf # copy over tez templates into conf dir. cp ${TEZ_SRC_DIR}/tez-api/target/site/apidocs/configs/tez-default-template.xml apache-tez-${RELEASE_VERSION}-bin/conf/ cp ${TEZ_SRC_DIR}/tez-runtime-library/target/site/apidocs/configs/tez-runtime-default-template.xml apache-tez-${RELEASE_VERSION}-bin/conf/ # TODO: If TEZ-3322 is not fixed, modify the config files under apache-tez-${RELEASE_VERSION}-bin/conf/ and add the Apache header mkdir apache-tez-${RELEASE_VERSION}-bin/share cp ${TEZ_SRC_DIR}/tez-dist/target/tez-${RELEASE_VERSION}.tar.gz apache-tez-${RELEASE_VERSION}-bin/share/tez.tar.gz COPYFILE_DISABLE=1 tar --exclude=.git -zcvf apache-tez-${RELEASE_VERSION}-bin.tar.gz apache-tez-${RELEASE_VERSION}-bin # Sign release and create checksums using commands similar to those called out earlier for the source tarball gpg2 --armor --output apache-tez-${RELEASE_VERSION}-bin.tar.gz.asc --detach-sig apache-tez-${RELEASE_VERSION}-bin.tar.gz openssl md5 apache-tez-${RELEASE_VERSION}-bin.tar.gz > apache-tez-${RELEASE_VERSION}-bin.tar.gz.md5 openssl dgst -sha512 apache-tez-${RELEASE_VERSION}-bin.tar.gz > apache-tez-${RELEASE_VERSION}-bin.tar.gz.sha512 #Remove unnecessary text from checksum files sed -i "" s/"^.*= "// apache-tez-${RELEASE_VERSION}-bin.tar.gz.md5 sed -i "" s/"^.*= "// apache-tez-${RELEASE_VERSION}-bin.tar.gz.sha512 #Verify integrity of checksum files |
Upload Artifacts for Release Vote
...
Find all JIRAs that were fixed in this release ( i.e. Fix Version set to the released version ) and do a bulk edit to mark them all as Closed. A useful point to note is that when doing this bulk update, mail notifications should be turned off to avoid triggering a barrage of emails being sent out. Find all JIRAs with fix version x.y.z and not-resolved/not-closed and remove the fix version. Once this is complete, using the JIRA Administration tab, mark the x.y.z as released and set the appropriate release date. Create the next version if its already not done. Find all JIRAs with target version x.y.z and not-resolved/not-closed and change the target version to the next release following the above bulk update process.