Skip to content

Commit 4e5a708

Browse files
author
Shlomi Noach
committed
testing dbdeployer version
1 parent b72ebfb commit 4e5a708

1 file changed

Lines changed: 40 additions & 27 deletions

File tree

script/cibuild-gh-ost-replica-tests

Lines changed: 40 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,30 @@ set -e
44

55
whoami
66

7-
# Clone gh-ost-ci-env
8-
# Only clone if not already running locally at latest commit
9-
remote_commit=$(git ls-remote https://github.com/github/gh-ost-ci-env.git tar-xz-binaries | cut -f1)
10-
local_commit="unknown"
11-
[ -d "gh-ost-ci-env" ] && local_commit=$(cd gh-ost-ci-env && git log --format="%H" -n 1)
12-
13-
echo "remote commit is: $remote_commit"
14-
echo "local commit is: $local_commit"
15-
16-
if [ "$remote_commit" != "$local_commit" ] ; then
17-
rm -rf ./gh-ost-ci-env
18-
git clone https://github.com/github/gh-ost-ci-env.git
19-
(
20-
cd gh-ost-ci-env
21-
git fetch origin tar-xz-binaries
22-
git checkout tar-xz-binaries
23-
)
24-
fi
7+
fetch_ci_env() {
8+
# Clone gh-ost-ci-env
9+
# Only clone if not already running locally at latest commit
10+
remote_commit=$(git ls-remote https://github.com/github/gh-ost-ci-env.git tar-xz-binaries | cut -f1)
11+
local_commit="unknown"
12+
[ -d "gh-ost-ci-env" ] && local_commit=$(cd gh-ost-ci-env && git log --format="%H" -n 1)
13+
14+
echo "remote commit is: $remote_commit"
15+
echo "local commit is: $local_commit"
16+
17+
if [ "$remote_commit" != "$local_commit" ] ; then
18+
rm -rf ./gh-ost-ci-env
19+
git clone https://github.com/github/gh-ost-ci-env.git
20+
(
21+
cd gh-ost-ci-env
22+
git fetch origin tar-xz-binaries
23+
git checkout tar-xz-binaries
24+
)
25+
fi
26+
}
27+
28+
test_dbdeployer() {
29+
gh-ost-ci-env/bin/linux/dbdeployer --version
30+
}
2531

2632
test_mysql_version() {
2733
local mysql_version
@@ -64,12 +70,19 @@ test_mysql_version() {
6470
find sandboxes -name "stop_all" | bash
6571
}
6672

67-
echo "Building..."
68-
. script/build
69-
# Test all versions:
70-
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
71-
echo "found MySQL version: $mysql_version"
72-
done
73-
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
74-
test_mysql_version "$mysql_version"
75-
done
73+
main() {
74+
fetch_ci_env
75+
test_dbdeployer
76+
77+
echo "Building..."
78+
. script/build
79+
# Test all versions:
80+
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
81+
echo "found MySQL version: $mysql_version"
82+
done
83+
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
84+
test_mysql_version "$mysql_version"
85+
done
86+
}
87+
88+
main()

0 commit comments

Comments
 (0)