vinishjail97 commented on code in PR #434: URL: https://github.com/apache/incubator-xtable/pull/434#discussion_r1717514431
########## release/release_guide.md: ########## @@ -0,0 +1,478 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +# Introduction + +Apache XTable, currently an incubating project at the Apache Software Foundation (ASF), is a cross-table converter for table formats that facilitates omni-directional interoperability across data processing systems and query engines. +This guide outlines the steps for releasing Apache XTable versions, following the ASF policies and incorporating practices from other successful ASF projects. + +# Legal Reminders + +Releasing software under the ASF banner requires adherence to the [ASF Release Policy](https://infra.apache.org/release-publishing.html) and [Incubator Release Guidelines](https://incubator.apache.org/guides/releasemanagement.html#best-practice). +Please ensure all releases comply with these guidelines, focusing on proper licensing, source code distribution, and community approval. + +# Overview + +The release process consists of several steps: + +1. Decide to release +2. Prepare for the release +3. Build a release candidate +4. Vote on the release candidate +5. During vote process, run validation tests +6. If necessary, fix any issues and go back to step 3. +7. Finalize the release +8. Promote the release + +# Decide to release + +Anybody can propose a release on the dev@ mailing list, giving a solid argument and nominating a committer as the +Release Manager (including themselves). There’s no formal process, no vote requirements, and no timing requirements. Any +objections should be resolved by consensus before starting the release. + +# Prepare for the release + +_Before your first release, you should perform one-time configuration steps. This will set up your security keys for +signing the release and access to various release repositories._ + +To prepare for each release, you should audit the project status in the Github issue tracker for any release-blockers and ensure all of them are resolved. +Finally, you should create a release branch from which individual release candidates will be built. + +**NOTE**: If you are +using [GitHub two-factor authentication](https://help.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/) +and haven’t configure HTTPS access, please +follow [the guide](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) to configure +command line access. + +## One-time Setup Instructions + +You need to have a GPG key to sign the release artifacts. Please be aware of the +ASF-wide [release signing guidelines](https://www.apache.org/dev/release-signing.html). If you don’t have a GPG key +associated with your Apache account, please follow the instructions below. + +### Create GPG public key with apache email + +- Install gpg using [https://gpgtools.org/](https://gpgtools.org/). +- Create gpg key with your apache emailId. +- Export the KeyId into an environment variable KEY_ID + +```shell +LOCAL_SVN_DIR=local_svn_dir +mkdir -p ~/$LOCAL_SVN_DIR && cd $LOCAL_SVN_DIR +svn checkout https://dist.apache.org/repos/dist/dev/incubator/xtable && cd xtable [email protected] +(gpg --list-sigs ${email} && gpg --armor --export ${name}) >> KEYS +svn --username=${apache_username} --password=${passowrd} commit -m "Add xtable directory and keys" +``` + +### Submit your GPG public key into MIT PGP Public Key Server + +In order to make yourself have the right permission to stage java artifacts in Apache Nexus staging repository, please +submit your GPG public key into [MIT PGP Public Key Server](http://pgp.mit.edu:11371/). + +Also send public key to ubuntu server via + +```shell +gpg --keyserver hkp://keyserver.ubuntu.com --send-keys ${KEY_ID} # send public key to ubuntu server +gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys ${KEY_ID} # verify +``` + +would also refer +to [stackoverflow](https://stackoverflow.com/questions/19462617/no-public-key-key-with-id-xxxxx-was-not-able-to-be-located-oss-sonatype-org) + +### Access to Apache Nexus repository + +Configure access to the Apache Nexus repository, which enables final deployment of releases to the Maven Central +Repository. + +1. You log in with your Apache account. +2. Confirm you have appropriate access by finding org.apache.xtable under Staging Profiles. +3. Navigate to your Profile (top right dropdown menu of the page). +4. Choose User Token from the dropdown, then click Access User Token. Copy a snippet of the Maven XML configuration + block. +5. Insert this snippet twice into your global Maven settings.xml file, typically ${HOME}/.m2/settings.xml. The end + result should look like this, where TOKEN_NAME and TOKEN_PASSWORD are your secret tokens: + +```xml +<settings> + <servers> + <server> + <id>apache.releases.https</id> + <username>TOKEN_NAME</username> + <password>TOKEN_PASSWORD</password> + </server> + <server> + <id>apache.snapshots.https</id> + <username>TOKEN_NAME</username> + <password>TOKEN_PASSWORD</password> + </server> + </servers> + </settings> +``` + + +## Create a release branch in apache/incubator-xtable repository + +**Skip this step if it is a bug fix release. But do set the env variables.** + +Release candidates are built from a release branch. As a final step in preparation for the release, you should create the release branch, push it to the Apache code repository, and update version information on the original branch. + +Export Some Environment variables in the terminal where you are running the release scripts + +- export RELEASE_VERSION=<RELEASE_VERSION_TO_BE_PUBLISHED>-incubating +- export NEXT_VERSION=<NEW_VERSION_IN_MASTER> +- export RC_NUM=<release_candidate_num_starting_from_1> +- export RELEASE_BRANCH=release-<RELEASE_VERSION_TO_BE_PUBLISHED>-rc<release_candidate_num_starting_from_1> + +Use cut_release_branch.sh to cut a release branch + +- Script: [cut_release_branch.sh](https://github.com/apache/incubator-xtable/blob/master/scripts/release/cut_release_branch.sh) + +Usage + +```shell +# Cut a release branch +./release/scripts/cut_release_branch.sh \ +--release=${RELEASE_VERSION} \ +--next_release=${NEXT_VERSION} \ +--rc_num=${RC_NUM} +# Show help page +./incubator-xtable/release/scripts/cut_release_branch.sh -h +``` + +## Verify that a Release Build Works + +Run "mvn -Prelease clean install" to ensure that the build processes are in good shape. // You need to execute this command once you have the release branch in apache/incubator-xtable + +```shell +mvn -Prelease clean install +``` + +# Build a release candidate + +The core of the release process is the build-vote-fix cycle. Each cycle produces one release candidate. The Release Manager repeats this cycle until the community approves one release candidate, which is then finalized. + +Set up a few environment variables to simplify Maven commands that follow. This identifies the release candidate being built. Start with RC_NUM equal to 1 and increment it for each candidate. + +1. Generate Source Release: This will create the tarball under incubator-xtable/src_release directory + 1. git checkout ${RELEASE_BRANCH} + 2. cd release && ./scripts/create_source_release.sh + > If you have multiple gpg keys(gpg --list-keys), then the signing command will take in the first key most likely. + > You will release this when it asks for a passphrase in a pop up. + > When asked for passphrase, ensure the intended key is the one asked for. + > + > Command used in script: + > + > gpg --armor --detach-sig ${RELEASE_DIR}/incubator-xtable-${RELEASE_VERSION}.src.tgz + > + > To use a specific key: update as follows: // replace FINGERPRINT + > + > gpg --local-user [FINGERPRINT] --armor --detach-sig ${RELEASE_DIR}/incubator-xtable-${RELEASE_VERSION}.src.tgz + 3. Verify Source release is signed and buildable + 1. cd ../src_release + 2. gpg --verify apache-xtable-${RELEASE_VERSION}.src.tgz.asc apache-xtable-${RELEASE_VERSION}.src.tgz + 3. git clone [email protected]:apache/incubator-xtable.git incubator-xtable-tmp-clone && cd incubator-xtable-tmp-clone && git checkout ${RELEASE_BRANCH} && cd .. + 4. tar -zxvf apache-xtable-${RELEASE_VERSION}.src.tgz + 5. diff -qr apache-xtable-${RELEASE_VERSION} incubator-xtable-tmp-clone Review Comment: @zabetak Added the diff check you had sent in the voting thread as part of the release guide. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
