Skip to content

Commit

Permalink
Install hugegraph from source with specified commit id (#120)
Browse files Browse the repository at this point in the history
Change-Id: I122d10d2b89b2a24fdc4fd402106129fd8dd95ed
  • Loading branch information
Linary committed Apr 16, 2021
1 parent bb65492 commit 6224c01
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ branches:
install: mvn compile -Dmaven.javadoc.skip=true | grep -v "Downloading\|Downloaded"

before_script:
- $TRAVIS_DIR/install-hugegraph.sh $TRAVIS_BRANCH | grep -v "Downloading\|Downloaded"
- $TRAVIS_DIR/install-hugegraph-from-source.sh $TRAVIS_BRANCH | grep -v "Downloading\|Downloaded"

script:
- mvn test -Dtest=UnitTestSuite
Expand All @@ -27,3 +27,4 @@ after_success:
env:
global:
- TRAVIS_DIR=assembly/travis
- COMMIT_ID=c0dff5b233e853716ca6f3f28a5cda05e6f3d639
42 changes: 42 additions & 0 deletions assembly/travis/install-hugegraph-from-source.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

set -ev

if [[ $# -ne 1 ]]; then
echo "Must pass base branch name of pull request"
exit 1
fi

CLIENT_BRANCH=$1
HUGEGRAPH_BRANCH=${CLIENT_BRANCH}
HUGEGRAPH_GIT_URL="https://github.com/hugegraph/hugegraph.git"

git clone --depth 100 ${HUGEGRAPH_GIT_URL}
cd hugegraph
git checkout ${COMMIT_ID}
mvn package -DskipTests
mv hugegraph-*.tar.gz ../
cd ../
rm -rf hugegraph
tar -zxvf hugegraph-*.tar.gz

HTTPS_SERVER_DIR="hugegraph_https"
mkdir ${HTTPS_SERVER_DIR}
cp -r hugegraph-*/. ${HTTPS_SERVER_DIR}
cd hugegraph-*
cp ../$TRAVIS_DIR/conf/* conf
# start HugeGraphServer with http protocol
echo -e "pa" | bin/init-store.sh || exit 1
bin/start-hugegraph.sh || exit 1

cd ../${HTTPS_SERVER_DIR}
REST_SERVER_CONFIG="conf/rest-server.properties"
GREMLIN_SERVER_CONFIG="conf/gremlin-server.yaml"
sed -i "s?http://127.0.0.1:8080?https://127.0.0.1:8443?g" "$REST_SERVER_CONFIG"
sed -i "s/#port: 8182/port: 8282/g" "$GREMLIN_SERVER_CONFIG"
echo "gremlinserver.url=http://127.0.0.1:8282" >> ${REST_SERVER_CONFIG}

# start HugeGraphServer with https protocol
bin/init-store.sh
bin/start-hugegraph.sh
cd ../
File renamed without changes.

0 comments on commit 6224c01

Please sign in to comment.