Skip to content

Commit

Permalink
fix3
Browse files Browse the repository at this point in the history
  • Loading branch information
martinrupp committed Jul 20, 2021
1 parent 4f14875 commit 7e99ae8
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 14 deletions.
40 changes: 26 additions & 14 deletions pipelines/upgrade-testing/check_upgrade.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,36 @@
#!/bin/bash

UPGRADE_URL=s3://splice-snapshots/upgrade_tests

if [ $# -lt 2 ]
then
echo "usage: bash create_upgrade_targz.sh {VERSION} {additional start-splice-cluster parameters}"
echo "------------------------------------------------------------------------------------------"
echo "uses a previously created tar.gz to test upgrade"
echo "e.g. bash create_upgrade_targz.sh 3.2.2021 -T 16"
echo "make sure you current branch has already been build"
echo "don't use -b, since we are deleting some files in platform_it/target"

exit 1
fi
VERSION=${1} # e.g. 3.1.0.1971
shift 1

PREVIOUS_BRANCH=`git rev-parse --abbrev-ref HEAD`

VERSION=${1}
shift
# creates a file platform_it_${VERSION}.tar.gz
git checkout tags/${VERSION}
cd platform_it
rm -rf target *.log snappy*.jnilib
cd ..

# stop current cluster
./start-splice-cluster $*
./start-splice-cluster -k

rm -rf upgrade_test_TMP
mkdir -p upgrade_test_TMP/platform_it/target
cd upgrade_test_TMP
cp -r ../platform_it/target/hbase platform_it/target/.
cp -r ../platform_it/target/zookeeper platform_it/target/.
tar -czvf ../platform_it_${VERSION}.tar.gz platform_it
cd ..
rm -rf upgrade_test_TMP

git checkout ${PREVIOUS_BRANCH}


# restart on that version
./start-splice-cluster $*

# clean up platform_it
cd platform_it
git clean -dfx
Expand Down
42 changes: 42 additions & 0 deletions pipelines/upgrade-testing/check_upgrade_fast.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash
UPGRADE_URL=s3://splice-snapshots/upgrade_tests

if [ $# -lt 2 ]
then
echo "usage: bash create_upgrade_targz.sh {VERSION} {additional start-splice-cluster parameters}"
echo "------------------------------------------------------------------------------------------"
echo "uses a previously created tar.gz to test upgrade"
echo "e.g. bash create_upgrade_targz.sh 3.2.2021 -T 16"
echo "make sure you current branch has already been build"
echo "don't use -b, since we are deleting some files in platform_it/target"

exit 1
fi

VERSION=${1}
shift

# stop current cluster
./start-splice-cluster -k

# clean up platform_it
cd platform_it
git clean -dfx
cd ..

# download the previous standalone data
aws s3 cp ${UPGRADE_URL}/platform_it_${VERSION}.tar.gz .
tar -xzvf platform_it_${VERSION}.tar.gz
rm platform_it_${VERSION}.tar.gz

# restart cluster
./start-splice-cluster -l $*

# test
if mvn -B -e surefire:test -Pcore,cdh6.3.0 -Dtest='UpgradeTestIT#*' -DskipServerStart -DfailIfNoTests=false; then
echo "UPGRADE SUCCEEDED"
cat platform_it/splice.log | grep 'upgrade scripts'
cat platform_it/splice.log | grep 'Running upgrade script'
else
echo "!!! UPGRADE FAILED !!!"
fi
1 change: 1 addition & 0 deletions pipelines/upgrade-testing/create_upgrade_targz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ rm -rf target *.log snappy*.jnilib
cd ..

./start-splice-cluster $*
./start-splice-cluster -k

rm -rf upgrade_test_TMP
mkdir -p upgrade_test_TMP/platform_it/target
Expand Down

0 comments on commit 7e99ae8

Please sign in to comment.