Skip to content

Commit

Permalink
feat: Upgrade sipi to 2.0.1 (#1459)
Browse files Browse the repository at this point in the history
  • Loading branch information
subotic authored Oct 18, 2019
1 parent ac6c1f5 commit 3368a3a
Show file tree
Hide file tree
Showing 60 changed files with 4,379 additions and 3,819 deletions.
15 changes: 3 additions & 12 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
!knora-ontologies
!webapi
webapi/target
.git
.gitignore
.idea
**/.gitignore
**/.idea
docs
private
project
salsah
target
triplestores
knora-graphdb-free
knora-graphdb-se
knora-sipi
knora-assets
knora-upgrade
triplestores
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
/info.aduna.logging.dir_IS_UNDEFINED/
.cache
.classpath
.docker
.ensime
.ensime_cache
.env
native
**/.DS_Store
docs/env
Expand All @@ -20,6 +22,7 @@ docs/project
salsah1/project
webapi/project
webapi/_fuseki/run
webapi/build
triplestores/graphdb-se-7
idea.vmoptions
sipi/test
Expand Down
90 changes: 29 additions & 61 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
dist: xenial
dist: bionic

sudo: required

addons:
chrome: stable
apt:
packages:
- expect

language:
- "scala"
- "python"
language: scala

scala:
- "2.12.1"
Expand All @@ -20,7 +21,7 @@ jdk:

services:
- docker
- redis-server
# - redis-server

env:
global:
Expand All @@ -41,12 +42,11 @@ before_cache:

cache:
directories:
- "$HOME/.ivy2"
- "$HOME/.ivy2"

before_install:
- openssl aes-256-cbc -K $encrypted_ec8f5e0fa991_key -iv $encrypted_ec8f5e0fa991_iv -in travis/secrets.tar.enc -out $TRAVIS_BUILD_DIR/travis/secrets.tar -d
- tar -C travis -xvf travis/secrets.tar
- sudo apt-get -qq update
- sudo apt-get install -y expect

stages:
- compile and stage
Expand Down Expand Up @@ -74,56 +74,32 @@ jobs:
# unit tests
- stage: test
script:
# prepare needed graphdb-se files
- mkdir -p $TRAVIS_BUILD_DIR/graphdb
- cp $TRAVIS_BUILD_DIR/travis/graphdb.license $TRAVIS_BUILD_DIR/graphdb/graphdb.license
- cp $TRAVIS_BUILD_DIR/webapi/scripts/KnoraRules.pie $TRAVIS_BUILD_DIR/graphdb
# start and initialize graphdb-se
- docker run -d -p 127.0.0.1:7200:7200 -v $TRAVIS_BUILD_DIR/graphdb:/graphdb -e GDB_HEAP_SIZE=$GDB_HEAP_SIZE ontotext/graphdb:$GRAPHDB_VERSION -Dgraphdb.license.file=/graphdb/graphdb.license
- sleep 15
- cd $TRAVIS_BUILD_DIR/webapi/scripts && ./graphdb-se-docker-init-knora-test-unit.sh
# hit graphdb with a request "waking-it-up"
- curl http://localhost:7200/rest/repositories
# start the built-in webapi server tests
- cd $TRAVIS_BUILD_DIR/ && sbt webapi/clean coverage 'webapi/testOnly -- -l org.knora.webapi.testing.tags.E2ETest' webapi/coverageReport
# upload code coverage report
# - sbt codacyCoverage
# set graphdb license
- export KNORA_GDB_LICENSE=$TRAVIS_BUILD_DIR/travis/graphdb.license
# start the integration tests
- make unit-tests-with-coverage
# print out .env file used by the stack
- make print-env-file
# e2e tests
- stage: test
script:
# prepare needed graphdb-se files
- mkdir -p $TRAVIS_BUILD_DIR/graphdb
- cp $TRAVIS_BUILD_DIR/travis/graphdb.license $TRAVIS_BUILD_DIR/graphdb/graphdb.license
- cp $TRAVIS_BUILD_DIR/webapi/scripts/KnoraRules.pie $TRAVIS_BUILD_DIR/graphdb
# start and initialize graphdb-se
- docker run -d -p 127.0.0.1:7200:7200 -v $TRAVIS_BUILD_DIR/graphdb:/graphdb -e GDB_HEAP_SIZE=$GDB_HEAP_SIZE ontotext/graphdb:$GRAPHDB_VERSION -Dgraphdb.license.file=/graphdb/graphdb.license
- sleep 15
- cd $TRAVIS_BUILD_DIR/webapi/scripts && ./graphdb-se-docker-init-knora-test-unit.sh
# hit graphdb with a request "waking-it-up"
- curl http://localhost:7200/rest/repositories
# start the built-in webapi server tests
- cd $TRAVIS_BUILD_DIR/ && sbt webapi/clean coverage 'webapi/testOnly -- -n org.knora.webapi.testing.tags.E2ETest' webapi/coverageReport
# upload code coverage report
# - sbt codacyCoverage
# set graphdb license
- export KNORA_GDB_LICENSE=$TRAVIS_BUILD_DIR/travis/graphdb.license
# start the integration tests
- make e2e-tests-with-coverage
# print out .env file used by the stack
- make print-env-file
# integration tests
- stage: test
script:
# prepare needed graphdb-se files
- mkdir -p $TRAVIS_BUILD_DIR/graphdb
- cp $TRAVIS_BUILD_DIR/travis/graphdb.license $TRAVIS_BUILD_DIR/graphdb/graphdb.license
- cp $TRAVIS_BUILD_DIR/webapi/scripts/KnoraRules.pie $TRAVIS_BUILD_DIR/graphdb
# start and initialize graphdb-se
- docker run -d -p 127.0.0.1:7200:7200 -v $TRAVIS_BUILD_DIR/graphdb:/graphdb -e GDB_HEAP_SIZE=$GDB_HEAP_SIZE ontotext/graphdb:$GRAPHDB_VERSION -Dgraphdb.license.file=/graphdb/graphdb.license
- sleep 15
- cd $TRAVIS_BUILD_DIR/webapi/scripts && ./graphdb-se-docker-init-knora-test-unit.sh
# start the sipi container (with production config)
- cd $TRAVIS_BUILD_DIR/sipi/ && docker-compose up -d sipi-it
# set graphdb license
- export KNORA_GDB_LICENSE=$TRAVIS_BUILD_DIR/travis/graphdb.license
# start the integration tests
- cd $TRAVIS_BUILD_DIR/ && sbt webapi/clean coverage webapi/it:test webapi/coverageReport
# upload code coverage report
# - sbt codacyCoverage
- make it-tests-with-coverage
# print out Sipi logs
- cd $TRAVIS_BUILD_DIR/sipi/ && docker-compose logs
- make stack-logs-sipi-no-follow
# print out .env file used by the stack
- make print-env-file
# upgrade tests
- stage: test
script:
Expand All @@ -135,7 +111,7 @@ jobs:
script:
- mkdir -p $TRAVIS_BUILD_DIR/docs/target
- chmod 777 $TRAVIS_BUILD_DIR/docs/target
- docker run --rm -v $TRAVIS_BUILD_DIR:/knora daschswiss/sbt-paradox /bin/sh -c "cd /knora && sbt docs/makeSite"
- make docs-build
# Salsah browser tests
#- stage: test
# script:
Expand All @@ -159,16 +135,6 @@ jobs:
# - cd $TRAVIS_BUILD_DIR/salsah1/lib/chromedriver/ && unzip chromedriver_linux64.zip
# # start built-in salsah1 browser tests
# - cd $TRAVIS_BUILD_DIR/salsah1/ && sbt headless:test
# testing docker images
- stage: test
script:
- sbt webapi/docker:publishLocal
- sbt salsah1/docker:publishLocal
- sbt knora-sipi/docker:publishLocal
- sbt knora-graphdb-se/docker:publishLocal
- sbt knora-graphdb-free/docker:publishLocal
- sbt knora-upgrade/docker:publishLocal
- sbt knora-assets/docker:publishLocal
- stage: publish
script:
# login into docker hub, build image, and push but only when on the "develop" branch or tagged
Expand All @@ -189,6 +155,8 @@ jobs:
- sbt knora-upgrade/docker:publish
# knora-assets
- sbt knora-assets/docker:publish
# publish images to daschswiss dockerhub organization
- make publish-all-images

notifications:
slack:
Expand Down
Loading

0 comments on commit 3368a3a

Please sign in to comment.