Skip to content

Commit cb2d1b8

Browse files
committed
try out docker arangodb container
1 parent 730397f commit cb2d1b8

File tree

2 files changed

+5
-44
lines changed

2 files changed

+5
-44
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
sudo: required
12
language: php
23

3-
dist: trusty
4+
services:
5+
- docker
46

57
matrix:
68
fast_finish: true

tests/travis/setup_arangodb.sh

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -35,51 +35,11 @@ echo "./phpunit --version"
3535
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
3636
cd $DIR
3737

38-
VERSION=devel
39-
NAME=ArangoDB-$VERSION
40-
41-
if [ ! -d "$DIR/$NAME" ]; then
42-
# download ArangoDB
43-
echo "curl -L -o $NAME.tar.gz https://www.arangodb.org/repositories/travisCI/$NAME.tar.gz"
44-
curl -L -o $NAME.tar.gz https://www.arangodb.org/repositories/travisCI/$NAME.tar.gz
45-
echo "tar zxf $NAME.tar.gz"
46-
tar zvxf $NAME.tar.gz
47-
fi
48-
49-
ARCH=$(arch)
50-
PID=$(echo $PPID)
51-
TMP_DIR="/tmp/arangodb.$PID"
52-
PID_FILE="/tmp/arangodb.$PID.pid"
53-
ARANGODB_DIR="$DIR/$NAME"
54-
ARANGOD="${ARANGODB_DIR}/bin/arangod_x86_64"
55-
56-
# create database directory
57-
mkdir ${TMP_DIR}
58-
59-
echo "Starting ArangoDB '${ARANGOD}'"
60-
61-
${ARANGOD} \
62-
--database.directory ${TMP_DIR} \
63-
--configuration none \
64-
--server.endpoint tcp://127.0.0.1:8529 \
65-
--javascript.app-path ${ARANGODB_DIR}/js/apps \
66-
--javascript.startup-directory ${ARANGODB_DIR}/js \
67-
--database.maximal-journal-size 1048576 \
68-
--server.authentication true &
38+
docker pull arangodb/arangodb-preview:nightly.devel
39+
docker run -d -e ARANGO_ROOT_PASSWORD="" -p 8529:8529 arangodb/arangodb-preview:nightly.devel
6940

7041
sleep 2
7142

72-
echo "Check for arangod process"
73-
process=$(ps auxww | grep "bin/arangod" | grep -v grep)
74-
75-
if [ "x$process" == "x" ]; then
76-
echo "no 'arangod' process found"
77-
echo "ARCH = $ARCH"
78-
exit 1
79-
fi
80-
81-
echo "Waiting until ArangoDB is ready on port 8529"
82-
8343
n=0
8444
# timeout value for startup
8545
timeout=60
@@ -95,5 +55,4 @@ then
9555
exit 1
9656
fi
9757

98-
9958
echo "ArangoDB is up"

0 commit comments

Comments
 (0)