...
- Script: preparation_before_release.sh
- Usage
Usage ./hudi/scripts/release/preparation_before_release.sh
- Tasks included
- Help you create a new GPG key if you want.
- Configure git user.signingkey with chosen pubkey.
- Add chosen pubkey into dev KEYS and release KEYS
NOTES: Only PMC can write into release repo. - Start GPG agents.
...
- Get more entropy for creating a GPG key
sudo apt-get install rng-tools
sudo rngd -r /dev/urandom
- Create a GPG key
gpg --full-generate-key
- Determine your Apache GPG Key and Key ID, as follows:
- gpg --list-keys
- This will list your GPG keys. One of these should reflect your Apache account, for example:
- --------------------------------------------------
- pub 2048R/935D191 2019-08-29
- uid Anonymous Anonymous <anonymous@apache.org>
- sub 2048R/CD4C59FD 2019-08-29
...
- Configure git to use this key when signing code by giving it your key ID, as follows:
git config --global user.signingkey CD4C59FD, or git config --global user.signingkey 623E08E06DB376684FB9599A3F5953147903948A
- You may drop the --global option if you’d prefer to use this key for the current repository only.
- Start GPG agent in order to unlock your GPG key
eval $(gpg-agent --daemon --no-grab --write-env-file $HOME/.gpg-agent-info)
export GPG_TTY=$(tty)
export GPG_AGENT_INFO
Access to Apache Nexus repository
...
- You log in with your Apache account.
- Confirm you have appropriate access by finding org.apache.hudi under Staging Profiles.
- Navigate to your Profile (top right dropdown menu of the page).
- Choose User Token from the dropdown, then click Access User Token. Copy a snippet of the Maven XML configuration block.
- 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:
Code Block |
---|
<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> |
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. If you have problem in submit your GPG key to the key server in browse, please try run
Code Block |
---|
gpg --keyserver hkp://pool.sks-keyservers.net --send-keys ${PUBLIC_KEY} and verify via gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys ${PUBLIC_KEY} |
...
also
...
send
...
public
...
key
...
to
...
ubuntu
...
server
...
via
...
Code Block |
---|
gpg --keyserver hkp://keyserver.ubuntu.com --send-keys ${PUBLIC_KEY} |
...
|
...
# send public key to ubuntu server gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys ${PUBLIC_KEY} |
...
# verify |
would also refer to stackoverflow.
Create a new version in JIRA
...
Export Some Environment variables in the terminal where you are running the release scripts
export RELEASE_VERSION=<RELEASE_VERSION_TO_BE_PUBLISHED>
export NEXT_VERSION=<NEW_VERSION_IN_MASTER>
export RELEASE_BRANCH=release-<RELEASE_VERSION_TO_BE_PUBLISHED>
export RC_NUM=<release_candidate_num_starting_from_1>
Use cut_release_branch.sh to cut a release branch
- Script: cut_release_branch.sh
Usage
Code Block |
---|
# Cut a release branch |
...
Cd scripts && ./release/cut_release_branch.sh \ |
...
--release=${RELEASE_VERSION} \ |
...
--next_release=${NEXT_VERSION} \ |
...
--rc_num=${RC_NUM} |
...
# Show help page |
...
./hudi/scripts/release/cut_release_branch.sh -h |
Checklist to proceed to the next step
...
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. Also, As Hudi is in incubation phase, all artifacts must include “-incubating” in their names
git checkout ${RELEASE_BRANCH}
- Run mvn version to set the proper rc number in all artifacts
mvn versions:set -DnewVersion=${RELEASE_VERSION}-incubating-rc${RC_NUM}
- Run Unit tests and ensure they succeed
mvn test -DskipITs=true
- Run Integration Tests and ensure they succeed
mvn verify -DskipUTs=true
- Commit and push this change to RELEASE branch
git commit -am “Bumping release candidate number ${RC_NUM}”
git push origin ${RELEASE_BRANCH}
- Generate Source Release:
- This will create the tarball under hudi/src_release directory
cd hudi/src_release
gpg --verify hudi-${RELEASE_VERSION}-incubating-rc${RC_NUM}.src.tgz.asc hudi-${RELEASE_VERSION}-incubating-rc${RC_NUM}.src.tgz
- You should verify that the signature is good
tar -zxvf hudi-${RELEASE_VERSION}-incubating-rc${RC_NUM}.src.tgz && cd hudi-${RELEASE_VERSION}-incubating-rc${RC_NUM} && mvn clean package -DskipTests
- If they pass, delete the repository we got from the tar-ball
cd ../ && rm -rf hudi-${RELEASE_VERSION}-incubating-rc${RC_NUM}
git checkout ${RELEASE_BRANCH}
- Run
cd scripts && ./release/create_source_release.sh
- Verify Source release is signed and buildable
- Create tag
git tag -
s $s ${RELEASE_VERSION}-incubating-rc${RC_NUM} "${RELEASE_VERSION}"
- if apache repo is origin.
git push origin ${RELEASE_VERSION}-incubating-rc${RC_NUM}
- Deploy maven artifacts and verify
- This will deploy jar artifacts to the Apache Nexus Repository, which is the staging area for deploying jars to Maven Central.
- Review all staged artifacts (https://repository.apache.org/). They should contain all relevant parts for each module, including pom.xml, jar, test jar, source, test source, javadoc, etc. Carefully review any new artifacts.
git checkout ${RELEASE_BRANCH}
- This will deploy 2.11 artifacts to repository.apache.org
cd scripts && ./release/deploy_staging_jars.sh --scala_version=2.11
- This will deploy 2.11 12 artifacts to repository.apache.org.
./release/deploy_staging_jars.sh --scala_version=2.12
- Review all staged artifacts to ensure it contains both 2.11 and 2.12 artifacts, mainly hudi-spark-bundle-2.11/2.12, hudi-spark-2.11/2.12, hudi-utilities-bundle_2.11/2.12 and hudi-utilities_2.11/2.12.
- Close the staging repository on Apache Nexus. When prompted for a description, enter “Apache Hudi (incubating), version ${RELEASE_VERSION}-incubating, release candidate ${RC_NUM}”.
- Stage source releases on dist.apache.org
- If you have not already, check out the Hudi section of the dev incubator repository on dist.apache.org via Subversion. In a fresh directoryfresh directory
- if you would not checkout, please try svn checkout https://dist.apache.org/repos/dist/dev/incubator/hudi --depth=immediates, if you would not checkout, please try svn checkout again. again.
--depth=immediates
- Make a directory for the new release:
mkdir hudi/hudi-${RELEASE_VERSION}-incubating-rc${RC_NUM}
- Copy Hudi source distributions, hashes, and GPG signature:
mv <hudi-dir>/src_release/* hudi/hudi-${RELEASE_VERSION}-incubating-rc${RC_NUM}
- Add and commit all the files.
cd hudi
svn add hudi-${RELEASE_VERSION}-incubating-rc${RC_NUM}
svn commit
- Verify that files are present
- Run Verification Script to ensure the source release is sane
cd scripts && ./release/validate_staged_release.sh --release=${RELEASE_VERSION} --rc_num=${RC_NUM} --verbose
Checklist to proceed to the next step
...
From: Release Manager Subject: [ANNOUNCE] Apache Hudi (incubating) 0.5.2 released<VERSION> released
The Apache Hudi(incubating) team is pleased to announce the release of Apache Hudi incubating 0.5incubating <VERSION>.2. Apache Hudi (incubating) (pronounced Hoodie) stands for Hadoop Upserts Deletes and Incrementals. Apache Hudi (incubating) manages storage of large analytical datasets on DFS (Cloud stores, HDFS or any Hadoop FileSystem compatible storage) and provides the ability to query them. This release comes xxx months after xxx. It includes more than You can start using it in Maven by simply updating your dependency to: <dependency> If you'd like to download the source release, you can find it here: https://github.com/apache/incubator-hudi/releases/tag/release-0.5.2<VERSION>-incubating You can read more about the release (including release notes) here: https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12322822&version=12346606<JIRA_VERSION> We welcome your help and feedback. For more information on how to Thanks to everyone involved! XXX |
...