Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions scripts/release/cut_release_branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,13 @@ else
fi

if [[ -z "$RELEASE" || -z "$NEXT_VERSION_IN_BASE_BRANCH" || -z "$RC_NUM" ]]; then
echo "This sricpt needs to be ran with params, please run with -h to get more instructions."
echo "This script needs to be ran with params, please run with -h to get more instructions."
exit
fi


MASTER_BRANCH=master
NEXT_VERSION_BRANCH=MINOR-move-to-${NEXT_VERSION_IN_BASE_BRANCH}
RELEASE_BRANCH=release-${RELEASE}
[email protected]:apache/hudi.git
HUDI_ROOT_DIR=hudi
Expand All @@ -71,6 +72,7 @@ echo "=====================Environment Variables====================="
echo "version: ${RELEASE}"
echo "next_release: ${NEXT_VERSION_IN_BASE_BRANCH}"
echo "working master branch: ${MASTER_BRANCH}"
echo "working next-version branch: ${NEXT_VERSION_BRANCH}"
echo "working release branch: ${RELEASE_BRANCH}"
echo "local repo dir: ~/${LOCAL_CLONE_DIR}/${HUDI_ROOT_DIR}"
echo "RC_NUM: $RC_NUM"
Expand All @@ -90,15 +92,16 @@ cd ${HUDI_ROOT_DIR}
git branch ${RELEASE_BRANCH}

git checkout ${MASTER_BRANCH}
git checkout -b ${NEXT_VERSION_BRANCH}

echo "====================Current working branch====================="
echo ${MASTER_BRANCH}
echo ${NEXT_VERSION_BRANCH}
echo "==============================================================="

# Update master branch
mvn versions:set -DnewVersion=${NEXT_VERSION_IN_BASE_BRANCH}-SNAPSHOT

echo "==============Update master branch as following================"
echo "===========Update next-version branch as following============="
git diff
echo "==============================================================="

Expand All @@ -110,14 +113,11 @@ if [[ $confirmation != "y" ]]; then
exit
fi

git commit -am "Moving to ${NEXT_VERSION_IN_BASE_BRANCH}-SNAPSHOT on master branch."
git commit -am "[MINOR] Moving to ${NEXT_VERSION_IN_BASE_BRANCH}-SNAPSHOT on master branch."

if git push origin ${MASTER_BRANCH}; then
break
else
clean_up
exit
fi
echo "==============================================================="
echo "!!Please open a PR based on ${NEXT_VERSION_BRANCH} branch for approval!! [Press ENTER to continue]"
read confirmation

# Checkout and update release branch
git checkout ${RELEASE_BRANCH}
Expand Down
20 changes: 14 additions & 6 deletions scripts/release/deploy_staging_jars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ declare -a ALL_VERSION_OPTS=(
"-Dscala-2.12 -Dspark3.1" # this profile goes last in this section to ensure bundles use avro 1.8

# spark bundles
"-Dscala-2.11 -Dspark2.4 -pl packaging/hudi-spark-bundle -am"
"-Dscala-2.11 -Dspark2.4 -pl packaging/hudi-spark-bundle,packaging/hudi-cli-bundle -am"
"-Dscala-2.12 -Dspark2.4 -pl packaging/hudi-spark-bundle -am"
"-Dscala-2.12 -Dspark3.3 -pl packaging/hudi-spark-bundle -am"
"-Dscala-2.12 -Dspark3.3 -pl packaging/hudi-spark-bundle,packaging/hudi-cli-bundle -am"
"-Dscala-2.12 -Dspark3.2 -pl packaging/hudi-spark-bundle -am"
"-Dscala-2.12 -Dspark3.1 -pl packaging/hudi-spark-bundle -am"

Expand Down Expand Up @@ -101,10 +101,18 @@ COMMON_OPTIONS="-DdeployArtifacts=true -DskipTests -DretryFailedDeploymentCount=
for v in "${ALL_VERSION_OPTS[@]}"
do
# clean everything before any round of depoyment
$MVN clean
echo "Building with options ${v}"
$MVN install "$COMMON_OPTIONS" "${v}"
$MVN clean $COMMON_OPTIONS
if [[ "$v" == *"$BUNDLE_MODULES_EXCLUDED"* ]]; then
# When deploying jars with bundle exclusions, we still need to build the bundles,
# by removing "-pl -packaging/hudi-aws-bundle...", otherwise the build fails.
v1=${v%${BUNDLE_MODULES_EXCLUDED}}
echo "Building with options ${v1%-pl }"
$MVN install $COMMON_OPTIONS ${v1%-pl }
else
echo "Building with options ${v}"
$MVN install $COMMON_OPTIONS ${v}
fi
echo "Deploying to repository.apache.org with version options ${v%-am}"
# remove `-am` option to only deploy intended modules
$MVN deploy "$COMMON_OPTIONS" "${v%-am}"
$MVN deploy $COMMON_OPTIONS ${v%-am}
done
4 changes: 4 additions & 0 deletions scripts/release/validate_staged_bundles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ VERSION=$2
STAGING_REPO="https://repository.apache.org/content/repositories/${REPO}/org/apache/hudi"

declare -a BUNDLE_URLS=(
"${STAGING_REPO}/hudi-aws-bundle/${VERSION}/hudi-aws-bundle-${VERSION}.jar"
"${STAGING_REPO}/hudi-cli-bundle_2.11/${VERSION}/hudi-cli-bundle_2.11-${VERSION}.jar"
"${STAGING_REPO}/hudi-cli-bundle_2.12/${VERSION}/hudi-cli-bundle_2.12-${VERSION}.jar"
"${STAGING_REPO}/hudi-datahub-sync-bundle/${VERSION}/hudi-datahub-sync-bundle-${VERSION}.jar"
"${STAGING_REPO}/hudi-flink1.13-bundle/${VERSION}/hudi-flink1.13-bundle-${VERSION}.jar"
"${STAGING_REPO}/hudi-flink1.14-bundle/${VERSION}/hudi-flink1.14-bundle-${VERSION}.jar"
Expand All @@ -39,6 +42,7 @@ declare -a BUNDLE_URLS=(
"${STAGING_REPO}/hudi-hive-sync-bundle/${VERSION}/hudi-hive-sync-bundle-${VERSION}.jar"
"${STAGING_REPO}/hudi-integ-test-bundle/${VERSION}/hudi-integ-test-bundle-${VERSION}.jar"
"${STAGING_REPO}/hudi-kafka-connect-bundle/${VERSION}/hudi-kafka-connect-bundle-${VERSION}.jar"
"${STAGING_REPO}/hudi-metaserver-server-bundle/${VERSION}/hudi-metaserver-server-bundle-${VERSION}.jar"
"${STAGING_REPO}/hudi-presto-bundle/${VERSION}/hudi-presto-bundle-${VERSION}.jar"
"${STAGING_REPO}/hudi-spark-bundle_2.11/${VERSION}/hudi-spark-bundle_2.11-${VERSION}.jar"
"${STAGING_REPO}/hudi-spark-bundle_2.12/${VERSION}/hudi-spark-bundle_2.12-${VERSION}.jar"
Expand Down