Repository: incubator-hivemall Updated Branches: refs/heads/master def42e997 -> ade26be31
Updated release guide and added artifact verification docs Project: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/commit/ade26be3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/tree/ade26be3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/diff/ade26be3 Branch: refs/heads/master Commit: ade26be31ca556d0a299f72c1838afbd67b25750 Parents: def42e9 Author: Makoto Yui <[email protected]> Authored: Thu Jan 25 17:34:51 2018 +0900 Committer: Makoto Yui <[email protected]> Committed: Thu Jan 25 17:34:51 2018 +0900 ---------------------------------------------------------------------- src/site/markdown/release-guide.md | 154 ++++++++++++++++---------------- 1 file changed, 78 insertions(+), 76 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/ade26be3/src/site/markdown/release-guide.md ---------------------------------------------------------------------- diff --git a/src/site/markdown/release-guide.md b/src/site/markdown/release-guide.md index 7c1e8d8..1c73133 100644 --- a/src/site/markdown/release-guide.md +++ b/src/site/markdown/release-guide.md @@ -31,8 +31,8 @@ If it is your first time doing an Apache release, then there is some initial set 1. Notifying the community the overall plan for the release 2. Ensure JIRA Issues are appropriately tagged for the Release - - [Check this link](https://issues.apache.org/jira/browse/HIVEMALL-162?jql=project%20%3D%20HIVEMALL%20AND%20status%20in%20(Resolved%2C%20Closed)%20AND%20fixVersion%20%3D%20EMPTY) for `CLOSED/RESOLVED` issues that does not have `FixVersion`. - - Then, ensure that all JIRA issues that are addressed in this release are marked with the release version in the `FixVersion` field of the issue. [Here](https://issues.apache.org/jira/browse/HIVEMALL-157?jql=project%20%3D%20HIVEMALL%20AND%20status%20in%20(Resolved%2C%20Closed)%20AND%20fixVersion%20%3D%200.5.0) is an example for v0.5.0 release. + - [Check this link](https://issues.apache.org/jira/browse/HIVEMALL-162?jql=project%20%3D%20HIVEMALL%20AND%20status%20in%20\(Resolved%2C%20Closed\)%20AND%20fixVersion%20%3D%20EMPTY) for `CLOSED/RESOLVED` issues that does not have `FixVersion`. + - Then, ensure that all JIRA issues that are addressed in this release are marked with the release version in the `FixVersion` field of the issue. [Here](https://issues.apache.org/jira/browse/HIVEMALL-157?jql=project%20%3D%20HIVEMALL%20AND%20status%20in%20\(Resolved%2C%20Closed\)%20AND%20fixVersion%20%3D%200.5.0) is an example for v0.5.0 release. ## UPDATE CHANGELOG @@ -47,26 +47,19 @@ Try installing locally artifacts with activation apache-release profile. The fol ```sh # JDK 7 is required for packaging -$ export JAVA_HOME=`/usr/libexec/java_home -v 1.7` +export JAVA_HOME=`/usr/libexec/java_home -v 1.7` -# Install xgboost jar to Maven local repository -$ mvn -Pcompile-xgboost validate +# Java 8 is required for building Spark 2.2 module +export JAVA8_HOME=`/usr/libexec/java_home -v 1.8` # Try to create artifacts -$ mvn -Papache-release clean install -``` - -Ensure that all unit tests passes. License check by Apache RAT (`mvn apache-rat:check`) will be ran by the above command. +export MAVEN_OPTS=-XX:MaxPermSize=256m -### Verify Signatures of Release Artifacts - -```sh -cd target/ -for file in `find . -type f -iname '*.asc'`; do - gpg --verify ${file} -done +mvn -Papache-release clean install ``` +Ensure that all unit tests passes. License check by Apache RAT (`mvn apache-rat:check`) will be ran by the above commands. + ## SNAPSHOT RELEASE ### PREPARE YOUR POMS FOR RELEASE @@ -74,55 +67,52 @@ done **1)** Switch to master syncing to ASF master ```sh -$ git checkout master -$ git fetch -$ git pull # or, git reset --hard asf/master +git checkout master +git fetch +git pull # or, git reset --hard asf/master ``` **2)** Set version string for a snapshot ```sh -$ version=X.Y.Z +version=X.Y.Z # RC should start at 1 and increment if early release candidates fail to release -$ rc=1 -# $ echo "${version}-incubating-SNAPSHOT" +rc=1 +# echo "${version}-incubating-SNAPSHOT" -$ ./bin/set_version.sh --pom --version "${version}-incubating-SNAPSHOT" +./bin/set_version.sh --pom --version "${version}-incubating-SNAPSHOT" ``` **Note:** _`--pom` option SHOULD only used for SNAPSHOT release._ ```sh -$ git commit -a -m "Prepare for the next Snapshot release of X.Y.Z" -$ git push asf master +git commit -a -m "Prepare for the next Snapshot release of X.Y.Z" +git push asf master ``` **3)** Perform a dryRun ```sh -$ version=X.Y.Z +version=X.Y.Z # RC should start at 1 and increment if early release candidates fail to release -$ rc=1 -$ next_version=X.(Y+1).Z +rc=1 +next_version=X.(Y+1).Z # Confirm that version and rc is defined. -$ echo "Release version: ${version}-incubating-rc${rc}" -$ echo "Development version: ${next_version}-incubating-SNAPSHOT" +echo "Release version: ${version}-incubating-rc${rc}" +echo "Development version: ${next_version}-incubating-SNAPSHOT" -$ mvn -Papache-release release:prepare \ --DautoVersionSubmodules=true -DdryRun=true \ --Darguments='-Dmaven.test.skip.exec=true' -DskipTests=true -Dmaven.test.skip=true \ --Dtag=v${version}-rc${rc} -DreleaseVersion=${version}-incubating-rc${rc} -DdevelopmentVersion=${next_version}-incubating-SNAPSHOT +mvn -Papache-release release:prepare \ + -DautoVersionSubmodules=true -DdryRun=true \ + -Darguments='-Dmaven.test.skip.exec=true' -DskipTests=true -Dmaven.test.skip=true \ + -Dtag=v${version}-rc${rc} -DreleaseVersion=${version}-incubating-rc${rc} -DdevelopmentVersion=${next_version}-incubating-SNAPSHOT ``` -Please provide the next SNAPSHOT version for next release WITHOUT `-rcX` e.g., as follows: - -`What is the new development version for "Apache Hivemall"?: X.(Y+1).Z-incubating-SNAPSHOT` - ### PUBLISH A SNAPSHOT ```sh -$ mvn deploy -Darguments='-Dmaven.test.skip.exec=true' -DskipTests=true -Dmaven.test.skip=true +mvn deploy \ + -Darguments='-Dmaven.test.skip.exec=true' -DskipTests=true -Dmaven.test.skip=true ``` **Note:** _You SHOULD verify the deployment under [the Maven Snapshot repository at Apache](https://repository.apache.org/content/repositories/snapshots/org/apache/hivemall/)._ @@ -134,10 +124,10 @@ $ mvn deploy -Darguments='-Dmaven.test.skip.exec=true' -DskipTests=true -Dmaven. **1)** Create a branch ```sh -$ git checkout -b vX.Y.Z +git checkout -b vX.Y.Z ``` -**Note: ** _Branch name starts with `v` and does not include `-rcX`._ +**Note:** _Branch name starts with `v` and does not include `-rcX`._ **2)** Send e-mail announcing the release branch @@ -160,51 +150,52 @@ I'll be going over the JIRAs to move every non-blocker from this release to the **1)** Set a release version ```sh -# $ version=X.Y.Z -# $ rc=1 +version=X.Y.Z +rc=1 +next_version=X.(Y+1).Z # Confirm that version and rc is defined. -$ echo ${version}-incubating-rc${rc} -X.Y.Z-incubating-rc1 +echo ${version}-incubating-rc${rc} +# X.Y.Z-incubating-rc1 ``` **2)** Update version strings in source codes. ```sh -$ ./bin/set_version.sh --version "${version}-incubating-rc${rc}" +./bin/set_version.sh --version "${version}-incubating-rc${rc}" # Check list of files to be committed. -$ git stauts -$ git commit -a -m "Bumped version string to ${version}-incubating-rc${rc}" +git stauts +git commit -a -m "Bumped version string to ${version}-incubating-rc${rc}" ``` -**3)** Prepare sets the version numbers in POM, creates a tag, and pushes it to git. +**3)** Prepare sets the version numbers in POM and creates a tag. ```sh -$ mvn -Papache-release release:clean release:prepare \ --DautoVersionSubmodules=true -DdryRun=false \ --Darguments='-Dmaven.test.skip.exec=true' -DskipTests=true -Dmaven.test.skip=true \ --Dtag=v${version}-rc${rc} -DreleaseVersion=${version}-incubating-rc${rc} -DdevelopmentVersion=${next_version}-incubating-SNAPSHOT +mvn -Papache-release release:clean release:prepare \ + -DautoVersionSubmodules=true -DdryRun=false \ + -Darguments='-Dmaven.test.skip.exec=true' -DskipTests=true -Dmaven.test.skip=true \ + -Dtag=v${version}-rc${rc} -DreleaseVersion=${version}-incubating-rc${rc} -DdevelopmentVersion=${next_version}-incubating-SNAPSHOT ``` -**4)** Update version strings for the development deversion +**4)** Update version strings for the development iteration ```sh -$ ./bin/set_version.sh --version "${next_version}-incubating-SNAPSHOT" +./bin/set_version.sh --version "${next_version}-incubating-SNAPSHOT" # Check list of files to be committed. -$ git stauts -$ git commit --amend -a +git stauts +git commit --amend -a ``` **5)** Push release branch and tag to remote ASF repository ```sh # Push the release branch -$ git push asf v${version} +git push asf v${version} # Push the release tag -$ git push asf v${version}-rc${rc} +git push asf v${version}-rc${rc} ``` ## STAGE THE RELEASE FOR A VOTE @@ -212,9 +203,9 @@ $ git push asf v${version}-rc${rc} The release will automatically be inserted into a temporary staging repository for you. ```sh -$ mvn -Papache-release release:perform \ --Darguments='-Dmaven.test.skip.exec=true' -DskipTests=true -Dmaven.test.skip=true \ --Dgoals=deploy -DlocalRepoDirectory=. -DlocalCheckout=true +mvn -Papache-release release:perform \ + -Darguments='-Dmaven.test.skip.exec=true' -DskipTests=true -Dmaven.test.skip=true \ + -Dgoals=deploy -DlocalRepoDirectory=. -DlocalCheckout=true ``` ### Verify nexus release artifacts @@ -235,14 +226,14 @@ Shaded jars does not have signatures. So, attach signatures to them as follows: cd target/ # Sign to the artifacts created by maven-shade-plugin -for f in `ls hivemall-*-with-dependencies.jar`; do +for f in `ls hivemall-*-with-dependencies*.jar`; do gpg --armor --output ${f}.asc --detach-sig ${f} - gpg --print-md MD5 ${f} > ${f}.md5 - gpg --print-md SHA1 ${f} > ${f}.sha1 + md5sum ${f} | cut -f1 -d' ' > ${f}.md5 + sha1sum ${f} | cut -f1 -d' ' > ${f}.sha1 done # Verify GPG sign -for file in `find . -type f -iname 'hivemall-*-with-dependencies.jar.asc'`; do +for file in `find . -type f -iname 'hivemall-*-with-dependencies*.jar.asc'`; do echo ${file} gpg --verify ${file} echo @@ -255,36 +246,39 @@ done ```sh # Checkout release SVN repository -$ mkdir -p dist/dev/incubator -$ cd dist/dev/incubator -$ svn co https://dist.apache.org/repos/dist/dev/incubator/hivemall/ -$ cd hivemall +mkdir -p dist/dev/incubator +cd dist/dev/incubator +svn co https://dist.apache.org/repos/dist/dev/incubator/hivemall/ +cd hivemall # Download release artifacts -$ wget -e robots=off --no-check-certificate \ +wget -e robots=off --no-check-certificate \ -r -np --reject=html,txt,tmp -nH --cut-dirs=7 \ https://repository.apache.org/content/repositories/orgapachehivemall-1001/org/apache/hivemall/hivemall/${version}-incubating-rc${rc}/ # Put ChangeLog -$ cd ${version}-incubating-rc${rc} +cd ${version}-incubating-rc${rc} # Put ChangeLog generated by JIRA -$ cp ~/Downloads/ChangeLog.html . +cp ~/Downloads/ChangeLog.html . # Put Shaded jars -$ cp ~/hivemall/target/hivemall-*-with-dependencies.jar* . +cp ~/incubator-hivemall/target/hivemall-*-with-dependencies*.jar* . ``` - Push release arfifacts to ASF svn repository ```sh -# cd dist/dev/incubator/hivemall +cd dist/dev/incubator/hivemall # ls ${version}-incubating-rc${rc} svn add ${version}-incubating-rc${rc}/ svn commit -m "Put hivemall version ${version}-incubating-rc${rc} artifacts" ``` +### Verify Release Artifacts + - Check release artifacts are properly deployed in the SVN repository: [https://dist.apache.org/repos/dist/dev/incubator/hivemall/X.Y.Z-incubating-rcZ/](https://dist.apache.org/repos/dist/dev/incubator/hivemall/0.5.0-incubating-rc1/) +- Follow [this guide](./verify_artifacts.html) for release artifacts verification. ## PPMC voting @@ -397,9 +391,17 @@ on behalf of Apache Hivemall PPMC ## Finalize release +### Publish to Maven Central in Nexus + +- Go to https://repository.apache.org/ and login +- Under Build Promotion, click Staging Repositories +- In the Staging Repositories tab there should be a line with profile org.apache.hivemall +- click `Release`. + - You shall now see your artifacts in the release repository created for you. In some hours, it should also appear in Maven Central. + ### Update JIRA -Update the JIRA versions page to close all issues, mark the version as `"released"`, and set the date to the date that the release was approved. You may also need to make a new release entry for the next release. +Update the JIRA versions page to close all issues, mark the version as `released`, and set the date to the date that the release was approved. You may also need to make a new release entry for the next release. ### Merge release branch for the next development iteration
