testing dbdeployer version

This commit is contained in:
Shlomi Noach 2020-02-05 10:49:52 +02:00
parent b72ebfbbd2
commit 4e5a708f30

View File

@ -4,24 +4,30 @@ set -e
whoami whoami
# Clone gh-ost-ci-env fetch_ci_env() {
# Only clone if not already running locally at latest commit # Clone gh-ost-ci-env
remote_commit=$(git ls-remote https://github.com/github/gh-ost-ci-env.git tar-xz-binaries | cut -f1) # Only clone if not already running locally at latest commit
local_commit="unknown" remote_commit=$(git ls-remote https://github.com/github/gh-ost-ci-env.git tar-xz-binaries | cut -f1)
[ -d "gh-ost-ci-env" ] && local_commit=$(cd gh-ost-ci-env && git log --format="%H" -n 1) local_commit="unknown"
[ -d "gh-ost-ci-env" ] && local_commit=$(cd gh-ost-ci-env && git log --format="%H" -n 1)
echo "remote commit is: $remote_commit" echo "remote commit is: $remote_commit"
echo "local commit is: $local_commit" echo "local commit is: $local_commit"
if [ "$remote_commit" != "$local_commit" ] ; then if [ "$remote_commit" != "$local_commit" ] ; then
rm -rf ./gh-ost-ci-env rm -rf ./gh-ost-ci-env
git clone https://github.com/github/gh-ost-ci-env.git git clone https://github.com/github/gh-ost-ci-env.git
( (
cd gh-ost-ci-env cd gh-ost-ci-env
git fetch origin tar-xz-binaries git fetch origin tar-xz-binaries
git checkout tar-xz-binaries git checkout tar-xz-binaries
) )
fi fi
}
test_dbdeployer() {
gh-ost-ci-env/bin/linux/dbdeployer --version
}
test_mysql_version() { test_mysql_version() {
local mysql_version local mysql_version
@ -64,12 +70,19 @@ test_mysql_version() {
find sandboxes -name "stop_all" | bash find sandboxes -name "stop_all" | bash
} }
echo "Building..." main() {
. script/build fetch_ci_env
# Test all versions: test_dbdeployer
find gh-ost-ci-env/mysql-tarballs/ -name "*.tar.xz" | while read f ; do basename $f ".tar.xz" ; done | sort -r | while read mysql_version ; do
echo "found MySQL version: $mysql_version" echo "Building..."
done . script/build
find gh-ost-ci-env/mysql-tarballs/ -name "*.tar.xz" | while read f ; do basename $f ".tar.xz" ; done | sort -r | while read mysql_version ; do # Test all versions:
test_mysql_version "$mysql_version" find gh-ost-ci-env/mysql-tarballs/ -name "*.tar.xz" | while read f ; do basename $f ".tar.xz" ; done | sort -r | while read mysql_version ; do
done echo "found MySQL version: $mysql_version"
done
find gh-ost-ci-env/mysql-tarballs/ -name "*.tar.xz" | while read f ; do basename $f ".tar.xz" ; done | sort -r | while read mysql_version ; do
test_mysql_version "$mysql_version"
done
}
main()