Skip to content

Commit

Permalink
chore(ci) add a ScyllaDB job (wip)
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaultcha committed Oct 3, 2018
1 parent 664422d commit 232e968
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 17 deletions.
41 changes: 35 additions & 6 deletions .ci/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,41 @@ set -e
# Install ccm
# -----------
pip install --user PyYAML six
git clone https://github.com/pcmanus/ccm.git
pushd ccm
# sha of 'Release 3.0.1'
git checkout 599e2026035e334dbc2ce24117ce745641506374
./setup.py install --user
popd

if [ -z "$SCYLLADB" ]; then
git clone https://github.com/pcmanus/ccm.git
pushd ccm
# sha of 'Release 3.0.1'
git checkout 599e2026035e334dbc2ce24117ce745641506374
./setup.py install --user
popd

else
pip install --user -I cassandra-driver==3.7.1 psutil

mkdir -p scylla-dir/resources
pushd scylla-dir
git clone https://github.com/scylladb/scylla.git
git clone https://github.com/scylladb/scylla-ccm.git
pushd scylla-ccm
source scylla_ccm_env.sh
popd

git clone https://github.com/scylladb/scylla-jmx.git
pushd scylla-jmx
mvn install
popd

git clone https://github.com/scylladb/scylla-tools-java.git
pushd scylla-tools-java
ant
popd

ln -s $PWD/scylla-tools-java ./resources/cassandra

export SCYLLADB_DIR=$PWD/scylla-tools-java
popd
fi

if [ "$OPENRESTY_TESTS" = true ]; then
#------------------------------
Expand Down
20 changes: 11 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,18 @@ env:
- INSTALL_CACHE=$HOME/install-cache
- PERL_DIR=$HOME/perl5
matrix:
- LUA="lua 5.1"
- LUA="lua 5.2"
- LUA="luajit 2.0"
- LUA="luajit 2.1"
#- LUA="lua 5.1"
#- LUA="lua 5.2"
#- LUA="luajit 2.0"
#- LUA="luajit 2.1"
#- OPENRESTY_TESTS=true
# CASSANDRA=3.9
#- OPENRESTY_TESTS=true
# CASSANDRA=2.2.8
#- OPENRESTY_TESTS=true
# CASSANDRA=2.1.16
- OPENRESTY_TESTS=true
CASSANDRA=3.9
- OPENRESTY_TESTS=true
CASSANDRA=2.2.8
- OPENRESTY_TESTS=true
CASSANDRA=2.1.16
SCYLLADB=2.3.0

before_install:
- source .ci/setup_env.sh
Expand Down
5 changes: 5 additions & 0 deletions spec/helpers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ end

local _M = {
cassandra_version = os.getenv("CASSANDRA") or "3.9",
scylladb_version = os.getenv("SCYLLADB") or "",
scylladb_dir = os.getenv("SCYLLADB_DIR") or "",
ssl_path = os.getenv("SSL_PATH") or "spec/fixtures/ssl"
}

Expand Down Expand Up @@ -74,6 +76,9 @@ function _M.ccm_start(opts)
if opts.pwd_auth then
cmd = cmd.." --pwd-auth"
end
if _M.scylladb_version then
cmd = cmd.." --scylla --vnodes --install-dir='".._M.SCYLLADB_DIR.."' --debug"
end

exec(cmd)
end
Expand Down
17 changes: 15 additions & 2 deletions util/prove_ccm.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
#!/usr/bin/env bash

CASSANDRA=${1:-3.9}
set -x

which ccm
ccm stop

if [[ ! $(ccm list | grep lua_cassandra_prove) ]]; then
ccm create lua_cassandra_prove -v binary:$CASSANDRA -n 3
if [[ -z "$SCYLLADB" ]]; then
CASSANDRA=${1:-3.9}

ccm create lua_cassandra_prove -v binary:$CASSANDRA -n 3
else
set -e
ccm create lua_cassandra_prove --scylla --vnodes -n 3 --install-dir=$SCYLLADB_DIR
ccm populate -n 3
ccm start --no-wait
exit 0
fi
fi

ccm switch lua_cassandra_prove
ccm start --wait-for-binary-proto

0 comments on commit 232e968

Please sign in to comment.